Description:
Refactor ImGui windows further.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r252:9036743e7918 -

@@ -25,11 +25,6
25 25 {
26 26 bool newShow = true;
27 27
28 // Entity newSelected;
29 var grey = new Num.Vector4(0.75f, 0.75f, 0.75f, 1f);
30 var darkgrey = new Num.Vector4(0.45f, 0.45f, 0.45f, 1f);
31 var black = new Num.Vector4(0f, 0f, 0f, 1f);
32 var title_bar = new Num.Vector4(0.65f, 0.65f, 0.65f, 1f);
33 28
34 29 if (newShow)
35 30 {
@@ -41,7 +36,7
41 36
42 37 ImGui.SetNextWindowSize(new Num.Vector2(320, 340));
43 38 ImGui.Begin("Contracts", ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings);
44 ImGui.ListBoxHeader("##Contracts:", new Num.Vector2(300, 150));
39 ImGui.ListBoxHeader("##Contracts:", new Num.Vector2(320, 150));
45 40 foreach (var contract in contracts.Where((contract) => ((!(new[] {ContractStatus.Expired, ContractStatus.Broken, ContractStatus.Rejected}.Contains(contract.status))
46 41 || ContractsWindow.show_all ))))
47 42 {
@@ -39,10 +39,9
39 39 ImGui.PushStyleColor(ImGuiCol.MenuBarBg, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f));
40 40 ImGui.PushStyleColor(ImGuiCol.PopupBg, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f));
41 41
42 var title_bar = new Num.Vector4(0.65f, 0.65f, 0.65f, 1f);
43 ImGui.PushStyleColor(ImGuiCol.TitleBg, title_bar);
44 ImGui.PushStyleColor(ImGuiCol.TitleBgActive, title_bar);
45 ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, title_bar);
42 ImGui.PushStyleColor(ImGuiCol.TitleBg, StyleSet.title_bar);
43 ImGui.PushStyleColor(ImGuiCol.TitleBgActive, StyleSet.title_bar);
44 ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, StyleSet.title_bar);
46 45
47 46 ImGui.PushStyleColor(ImGuiCol.Border, new Num.Vector4(0f, 0f, 0f, 1f));
48 47 ImGui.PushStyleColor(ImGuiCol.BorderShadow, new Num.Vector4(0f, 0f, 0f, 0.5f));
@@ -81,10 +81,9
81 81 ImGui.PushStyleColor(ImGuiCol.HeaderActive, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f));
82 82 ImGui.PushStyleColor(ImGuiCol.ButtonHovered, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f));
83 83
84 var title_bar = new Num.Vector4(0.65f, 0.65f, 0.65f, 1f);
85 ImGui.PushStyleColor(ImGuiCol.TitleBg, title_bar);
86 ImGui.PushStyleColor(ImGuiCol.TitleBgActive, title_bar);
87 ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, title_bar);
84 ImGui.PushStyleColor(ImGuiCol.TitleBg, StyleSet.title_bar);
85 ImGui.PushStyleColor(ImGuiCol.TitleBgActive, StyleSet.title_bar);
86 ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, StyleSet.title_bar);
88 87
89 88 ImGui.PushStyleColor(ImGuiCol.Border, new Num.Vector4(0f, 0f, 0f, 1f));
90 89 ImGui.PushStyleColor(ImGuiCol.BorderShadow, new Num.Vector4(0f, 0f, 0f, 0.5f));
@@ -8,10 +8,10
8 8 {
9 9 public class StyleSet
10 10 {
11 static Num.Vector4 grey = new Num.Vector4(0.75f, 0.75f, 0.75f, 1f);
12 static Num.Vector4 darkgrey = new Num.Vector4(0.45f, 0.45f, 0.45f, 1f);
13 static Num.Vector4 black = new Num.Vector4(0f, 0f, 0f, 1f);
14 static Num.Vector4 title_bar = new Num.Vector4(0.65f, 0.65f, 0.65f, 1f);
11 public static Num.Vector4 grey = new Num.Vector4(0.75f, 0.75f, 0.75f, 1f);
12 public static Num.Vector4 darkgrey = new Num.Vector4(0.45f, 0.45f, 0.45f, 1f);
13 public static Num.Vector4 black = new Num.Vector4(0f, 0f, 0f, 1f);
14 public static Num.Vector4 title_bar = new Num.Vector4(0.65f, 0.65f, 0.65f, 1f);
15 15 public static Dictionary<ImGuiStyleVar, float> defaultWindowVars = new Dictionary<ImGuiStyleVar, float>{
16 16 { ImGuiStyleVar.FrameRounding, 0.0f },
17 17 {ImGuiStyleVar.WindowRounding, 0.0f},
You need to be logged in to leave comments. Login now