diff --git a/isometric-park-fna/Renderers/ImGuiWindowRenderer.cs b/isometric-park-fna/Renderers/ImGuiWindowRenderer.cs --- a/isometric-park-fna/Renderers/ImGuiWindowRenderer.cs +++ b/isometric-park-fna/Renderers/ImGuiWindowRenderer.cs @@ -40,6 +40,7 @@ var related_organization = GetComponent(entity).Entity; name = GetComponent(related_organization).DisplayName; + image_index = GetComponent(related_organization).ImageIndex; } return (entity, name, status, amount, tree_delta, image_index); diff --git a/isometric-park-fna/UI/ContractWindow.cs b/isometric-park-fna/UI/ContractWindow.cs --- a/isometric-park-fna/UI/ContractWindow.cs +++ b/isometric-park-fna/UI/ContractWindow.cs @@ -47,7 +47,7 @@ StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars); StyleSet.pushColorSet(StyleSet.defaultWindowColors); ImGui.SetNextWindowSize(new Num.Vector2(320, 360)); - ImGui.Begin(string.Format("Contract {0}", name), ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings); + ImGui.Begin(string.Format("Contract {0} ## {1}", name, entity.ID), ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings); 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 diff --git a/isometric-park-fna/UI/ContractsWindow.cs b/isometric-park-fna/UI/ContractsWindow.cs --- a/isometric-park-fna/UI/ContractsWindow.cs +++ b/isometric-park-fna/UI/ContractsWindow.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; @@ -40,7 +41,8 @@ foreach (var contract in contracts.Where((contract) => ((!(new[] {ContractStatus.Expired, ContractStatus.Broken, ContractStatus.Rejected}.Contains(contract.status)) || ContractsWindow.show_all )))) { - if (ImGui.Selectable(contract.name, ContractsWindow.selected.entity== contract.entity)) + if (ImGui.Selectable(String.Format("{0}##{1}",contract.name, contract.entity.ID), + ContractsWindow.selected.entity == contract.entity)) { ContractsWindow.selected.entity= contract.entity; // newSelected = contract.entity;