Description:
Tweak dialog boxes.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r35:34c640f57515 -

1 NO CONTENT: new file 100755, binary diff hidden
NO CONTENT: new file 100755, binary diff hidden
1 NO CONTENT: new file 100755, binary diff hidden
NO CONTENT: new file 100755, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -36,7 +36,18
36 public DebugWindow(ImGuiRenderer _imGuiRenderer, GraphicsDevice graphicsDevice)
36 public DebugWindow(ImGuiRenderer _imGuiRenderer, GraphicsDevice graphicsDevice)
37 {
37 {
38 ImGuiIOPtr io = ImGui.GetIO();
38 ImGuiIOPtr io = ImGui.GetIO();
39 this.monoFont = io.Fonts.AddFontFromFileTTF(@"Content/iosevka-medium.ttf", 15);
39 //io.Fonts.AddFontFromFileTTF(@"Content/iosevka-term-medium.ttf", 15);
40
41 #if DEBUG
42 io.Fonts.AddFontFromFileTTF(@"Content/iosevka-medium.ttf", 15);
43 io.Fonts.AddFontFromFileTTF(@"Content/iosevka-term-medium.ttf", 15);
44 io.Fonts.AddFontFromFileTTF(@"Content/iosevka-term-medium.ttf", 17);
45 io.Fonts.AddFontFromFileTTF(@"Content/iosevka-term-extendedmedium.ttf", 20);
46 io.Fonts.AddFontFromFileTTF(@"Content/iosevka-term-extendedmedium.ttf", 25);
47 io.Fonts.AddFontFromFileTTF(@"Content/iosevka-term-extendedmedium.ttf", 30);
48 #endif
49 this.monoFont = io.Fonts.AddFontFromFileTTF(@"Content/iosevka-term-extendedmedium.ttf", 15);
50
40 _imGuiRenderer.RebuildFontAtlas(); // Required so fonts are available for rendering
51 _imGuiRenderer.RebuildFontAtlas(); // Required so fonts are available for rendering
41
52
42
53
@@ -15,6 +15,9
15 using static isometricparkfna.TileMap;
15 using static isometricparkfna.TileMap;
16 using isometricparkfna.Utils;
16 using isometricparkfna.Utils;
17
17
18 using Num = System.Numerics;
19
20
18
21
19 using ImGuiNET.SampleProgram.XNA;
22 using ImGuiNET.SampleProgram.XNA;
20 using ImGuiNET;
23 using ImGuiNET;
@@ -182,7 +185,7
182 );
185 );
183
186
184
187
185 var bakedMono = TtfFontBaker.Bake(File.OpenRead(@"Content/iosevka-medium.ttf"),
188 var bakedMono = TtfFontBaker.Bake(File.OpenRead(@"Content/iosevka-term-extendedmedium.ttf"),
186 15,
189 15,
187 1024,
190 1024,
188 1024,
191 1024,
@@ -798,11 +801,30
798
801
799 if (showInitial)
802 if (showInitial)
800 {
803 {
804 //ImGui.PushFont(debugWindow.monoFont);
805
806 ImGui.PushStyleVar(ImGuiStyleVar.FrameRounding, 0.0f);
807 ImGui.PushStyleVar(ImGuiStyleVar.WindowRounding, 0.0f);
808 ImGui.PushStyleVar(ImGuiStyleVar.FrameBorderSize, 1.0f);
809 ImGui.PushStyleColor(ImGuiCol.WindowBg, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f));
810
811 var title_bar = new Num.Vector4(0.65f, 0.65f, 0.65f, 1f);
812 ImGui.PushStyleColor(ImGuiCol.TitleBg, title_bar);
813 ImGui.PushStyleColor(ImGuiCol.TitleBgActive, title_bar);
814 ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, title_bar);
815
816 ImGui.PushStyleColor(ImGuiCol.Border, new Num.Vector4(0f, 0f, 0f, 1f));
817 ImGui.PushStyleColor(ImGuiCol.BorderShadow, new Num.Vector4(0f, 0f, 0f, 0.5f));
818
819
820
821 ImGui.PushStyleColor(ImGuiCol.Button, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f));
822 ImGui.PushStyleColor(ImGuiCol.Text, new Num.Vector4(0f, 0f, 0f, 1f));
801 ImGui.Begin("The Governor", ref showInitial);
823 ImGui.Begin("The Governor", ref showInitial);
802 ImGui.PushFont(debugWindow.monoFont);
824
803 ImGui.TextWrapped(currentNode.data.response);
804
825
805 if ((currentNode.children != null) && currentNode.children.Length > 0)
826 ImGui.TextWrapped(currentNode.data.response);
827 if ((currentNode.children != null) && currentNode.children.Length > 0)
806 {
828 {
807 foreach (Node<DialogOption> child in currentNode.children)
829 foreach (Node<DialogOption> child in currentNode.children)
808 {
830 {
@@ -826,8 +848,10
826 this.simulation.paused = false;
848 this.simulation.paused = false;
827
849
828 }
850 }
829
851 ImGui.End();
830 ImGui.PopFont();
852 ImGui.PopStyleVar(3);
853 ImGui.PopStyleColor(8);
854 //ImGui.PopFont();
831 }
855 }
832
856
833 _imGuiRenderer.AfterLayout();
857 _imGuiRenderer.AfterLayout();
@@ -117,6 +117,12
117 <None Include="fnalibs\x86\MojoShader.dll" />
117 <None Include="fnalibs\x86\MojoShader.dll" />
118 <None Include="fnalibs\x86\SDL2.dll" />
118 <None Include="fnalibs\x86\SDL2.dll" />
119 <None Include="fnalibs\x86\SDL2_image.dll" />
119 <None Include="fnalibs\x86\SDL2_image.dll" />
120 <None Include="Content\iosevka-term-extendedmedium.ttf">
121 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
122 </None>
123 <None Include="Content\iosevka-term-medium.ttf">
124 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
125 </None>
120 </ItemGroup>
126 </ItemGroup>
121 <ItemGroup>
127 <ItemGroup>
122 <Reference Include="System" />
128 <Reference Include="System" />
You need to be logged in to leave comments. Login now