Description:
Refactor ImGui windows further.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -25,11 +25,6 | |||||
|
25 | { |
|
25 | { |
|
26 | bool newShow = true; |
|
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 | if (newShow) |
|
29 | if (newShow) |
|
35 | { |
|
30 | { |
@@ -41,7 +36,7 | |||||
|
41 |
|
36 | ||
|
42 | ImGui.SetNextWindowSize(new Num.Vector2(320, 340)); |
|
37 | ImGui.SetNextWindowSize(new Num.Vector2(320, 340)); |
|
43 | ImGui.Begin("Contracts", ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings); |
|
38 | ImGui.Begin("Contracts", ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings); |
|
44 |
ImGui.ListBoxHeader("##Contracts:", new Num.Vector2(3 |
|
39 | ImGui.ListBoxHeader("##Contracts:", new Num.Vector2(320, 150)); |
|
45 | foreach (var contract in contracts.Where((contract) => ((!(new[] {ContractStatus.Expired, ContractStatus.Broken, ContractStatus.Rejected}.Contains(contract.status)) |
|
40 | foreach (var contract in contracts.Where((contract) => ((!(new[] {ContractStatus.Expired, ContractStatus.Broken, ContractStatus.Rejected}.Contains(contract.status)) |
|
46 | || ContractsWindow.show_all )))) |
|
41 | || ContractsWindow.show_all )))) |
|
47 | { |
|
42 | { |
@@ -39,10 +39,9 | |||||
|
39 | ImGui.PushStyleColor(ImGuiCol.MenuBarBg, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); |
|
39 | ImGui.PushStyleColor(ImGuiCol.MenuBarBg, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); |
|
40 | ImGui.PushStyleColor(ImGuiCol.PopupBg, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); |
|
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); |
|
42 | ImGui.PushStyleColor(ImGuiCol.TitleBg, StyleSet.title_bar); |
|
43 | ImGui.PushStyleColor(ImGuiCol.TitleBg, title_bar); |
|
43 | ImGui.PushStyleColor(ImGuiCol.TitleBgActive, StyleSet.title_bar); |
|
44 |
ImGui.PushStyleColor(ImGuiCol.TitleBg |
|
44 | ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, StyleSet.title_bar); |
|
45 | ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, title_bar); |
|
||
|
46 |
|
45 | ||
|
47 | ImGui.PushStyleColor(ImGuiCol.Border, new Num.Vector4(0f, 0f, 0f, 1f)); |
|
46 | ImGui.PushStyleColor(ImGuiCol.Border, new Num.Vector4(0f, 0f, 0f, 1f)); |
|
48 | ImGui.PushStyleColor(ImGuiCol.BorderShadow, new Num.Vector4(0f, 0f, 0f, 0.5f)); |
|
47 | ImGui.PushStyleColor(ImGuiCol.BorderShadow, new Num.Vector4(0f, 0f, 0f, 0.5f)); |
@@ -81,10 +81,9 | |||||
|
81 | ImGui.PushStyleColor(ImGuiCol.HeaderActive, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); |
|
81 | ImGui.PushStyleColor(ImGuiCol.HeaderActive, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); |
|
82 | ImGui.PushStyleColor(ImGuiCol.ButtonHovered, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); |
|
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); |
|
84 | ImGui.PushStyleColor(ImGuiCol.TitleBg, StyleSet.title_bar); |
|
85 | ImGui.PushStyleColor(ImGuiCol.TitleBg, title_bar); |
|
85 | ImGui.PushStyleColor(ImGuiCol.TitleBgActive, StyleSet.title_bar); |
|
86 |
ImGui.PushStyleColor(ImGuiCol.TitleBg |
|
86 | ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, StyleSet.title_bar); |
|
87 | ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, title_bar); |
|
||
|
88 |
|
87 | ||
|
89 | ImGui.PushStyleColor(ImGuiCol.Border, new Num.Vector4(0f, 0f, 0f, 1f)); |
|
88 | ImGui.PushStyleColor(ImGuiCol.Border, new Num.Vector4(0f, 0f, 0f, 1f)); |
|
90 | ImGui.PushStyleColor(ImGuiCol.BorderShadow, new Num.Vector4(0f, 0f, 0f, 0.5f)); |
|
89 | ImGui.PushStyleColor(ImGuiCol.BorderShadow, new Num.Vector4(0f, 0f, 0f, 0.5f)); |
@@ -8,10 +8,10 | |||||
|
8 | { |
|
8 | { |
|
9 | public class StyleSet |
|
9 | public class StyleSet |
|
10 | { |
|
10 | { |
|
11 | static Num.Vector4 grey = new Num.Vector4(0.75f, 0.75f, 0.75f, 1f); |
|
11 | public 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); |
|
12 | public 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); |
|
13 | public 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); |
|
14 | public static Num.Vector4 title_bar = new Num.Vector4(0.65f, 0.65f, 0.65f, 1f); |
|
15 | public static Dictionary<ImGuiStyleVar, float> defaultWindowVars = new Dictionary<ImGuiStyleVar, float>{ |
|
15 | public static Dictionary<ImGuiStyleVar, float> defaultWindowVars = new Dictionary<ImGuiStyleVar, float>{ |
|
16 | { ImGuiStyleVar.FrameRounding, 0.0f }, |
|
16 | { ImGuiStyleVar.FrameRounding, 0.0f }, |
|
17 | {ImGuiStyleVar.WindowRounding, 0.0f}, |
|
17 | {ImGuiStyleVar.WindowRounding, 0.0f}, |
You need to be logged in to leave comments.
Login now