Description:
Associate images with companies.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -40,6 +40,7 | |||
|
40 | 40 | var related_organization = GetComponent<RelatedOrganizationComponent>(entity).Entity; |
|
41 | 41 | |
|
42 | 42 | name = GetComponent<NameComponent>(related_organization).DisplayName; |
|
43 | image_index = GetComponent<ImageComponent>(related_organization).ImageIndex; | |
|
43 | 44 | } |
|
44 | 45 | |
|
45 | 46 | return (entity, name, status, amount, tree_delta, image_index); |
@@ -47,7 +47,7 | |||
|
47 | 47 | StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars); |
|
48 | 48 | StyleSet.pushColorSet(StyleSet.defaultWindowColors); |
|
49 | 49 | ImGui.SetNextWindowSize(new Num.Vector2(320, 360)); |
|
50 | ImGui.Begin(string.Format("Contract {0}", name), ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings); | |
|
50 | ImGui.Begin(string.Format("Contract {0} ## {1}", name, entity.ID), ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings); | |
|
51 | 51 | |
|
52 | 52 | ImGui.Image(_imGuiTexture, new Num.Vector2(250, 200), map.GetSourceUVStart(imageIndex), map.GetSourceUVEnd(imageIndex), Num.Vector4.One, Num.Vector4.Zero); // Here, the previously loaded texture is used |
|
53 | 53 |
@@ -1,3 +1,4 | |||
|
1 | using System; | |
|
1 | 2 | using System.Collections.Generic; |
|
2 | 3 | using System.Linq; |
|
3 | 4 | |
@@ -40,7 +41,8 | |||
|
40 | 41 | foreach (var contract in contracts.Where((contract) => ((!(new[] {ContractStatus.Expired, ContractStatus.Broken, ContractStatus.Rejected}.Contains(contract.status)) |
|
41 | 42 | || ContractsWindow.show_all )))) |
|
42 | 43 | { |
|
43 |
if (ImGui.Selectable(contract.name, |
|
|
44 | if (ImGui.Selectable(String.Format("{0}##{1}",contract.name, contract.entity.ID), | |
|
45 | ContractsWindow.selected.entity == contract.entity)) | |
|
44 | 46 | { |
|
45 | 47 | ContractsWindow.selected.entity= contract.entity; |
|
46 | 48 | // newSelected = contract.entity; |
You need to be logged in to leave comments.
Login now