diff --git a/FNA/obj/Debug/FNA.csproj.FileListAbsolute.txt b/FNA/obj/Debug/FNA.csproj.FileListAbsolute.txt --- a/FNA/obj/Debug/FNA.csproj.FileListAbsolute.txt +++ b/FNA/obj/Debug/FNA.csproj.FileListAbsolute.txt @@ -18,3 +18,4 @@ /Users/alys/repos/isometric-park-fna/FNA/obj/Debug/FNA.csproj.CoreCompileInputs.cache /Users/alys/repos/isometric-park-fna/FNA/obj/Debug/FNA.dll /Users/alys/repos/isometric-park-fna/FNA/obj/Debug/FNA.pdb +/Users/alys/repos/isometric-park-fna/FNA/obj/Debug/FNA.csprojAssemblyReference.cache diff --git a/SpriteFontPlus/src/obj/Debug/net45/SpriteFontPlus.FNA.csprojAssemblyReference.cache b/SpriteFontPlus/src/obj/Debug/net45/SpriteFontPlus.FNA.csprojAssemblyReference.cache index c3c1903db304082385e1f33ac6635b30b4344350..09f263a5e251ed61d98c6b1e95c877b687758fe6 GIT binary patch literal 424 zc$|Gv!Ait15KV2n?phD)MLc+@_Yzu`qL(6A5J5$y%N~_!JJqn+Mw0ZfezX6e87-dF zIlN3JZ}Q$G%wvpwxS*9{f5*Y&t!T6|sxz&DNmEQ z9HbpI7CjDDgG}Q4p_Zb##_dwAu`lX$(dFG~mt}39!U94PJNaFs+8T?S%7R5=%{n3R zYv&(-A2}CNVq={J!>_=+Sg0kE>zVH$Ao!O$afH1a1??p?R_Wbwp2*oP)#ep6>M4;c z@rHpbn#l^}fQB)jg<&*39527qt>{7i^t?Zuoga~nz`+3}Apyw+RQjWjri`A%bMGFv Q1cS`;=Hd7m^U0V*pP;{W!vFvP diff --git a/SpriteFontPlus/src/obj/Release/net45/SpriteFontPlus.FNA.csprojAssemblyReference.cache b/SpriteFontPlus/src/obj/Release/net45/SpriteFontPlus.FNA.csprojAssemblyReference.cache index 4c4ceafca7307bf9417641e873dd1afefe091cb4..2abeceb0e67ae2229d99e06af0857b1dbd1a1dbf GIT binary patch literal 5631 zc%1E*&2Jk;6u@`ZyY{Y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L5YkB2FK;)=DkqZF(zdzL?co&5+wNt2iwIXX z$9m3sjq7r()2a7M&)cb8lLV(azcd(i@m-UhcPtpabx!3N6r74N6~cP1%xzG9txA_W zcN>)N!d1Fzv$jF`gnHLHhAla~wR#$rCWa?D%C)9?l@#Gz|)ML$i>&fa6wv8ULE#tKW z)@*H4s?_DYYQUOXI*2&s@wx(QZto)N3SK^7O+l+DBAqwovbVsm)?y=WB7Wr~cGbuE z)ey0(Va~5oHGl|r(^+2HdyMldR@(bK=U1l^#XWq9*wwjQe#IFS+@Kn8CFQPJ%xVP$ zsdoa7z!VsnHL#2-;hk0o^t827UTSVhC8_r2_FJq2X1r)}4L&mdPxoAI-M)eC|KE50 z-~ZWSi!J}df_Z(zeLax;K~Rpcy>>SphZ7TE=^p}!b4h4VTAxqo1xw$i9|73;-_HMb I{^$AspRSN5m;e9( diff --git a/isometric-park-fna/Dialog.cs b/isometric-park-fna/Dialog.cs --- a/isometric-park-fna/Dialog.cs +++ b/isometric-park-fna/Dialog.cs @@ -1,6 +1,10 @@ using System; +using ImGuiNET; using isometricparkfna.Utils; +using Num = System.Numerics; + + namespace isometricparkfna { @@ -28,6 +32,87 @@ }) ); - } + + public static Node testTree = new Node( + new DialogOption + { + response = "Hi.", + }, + + new Node[]{ + new Node(new DialogOption {choice="Hi.", response="*walks away*" }), + new Node(new DialogOption {choice="What's up?", response="Not much!" }) + + } + ); + + } + + public static class DialogInterface + { + public static Node RenderDialog(string title, ref bool show, ref bool paused, ImFontPtr font, Node currentNode) + { + if (show) + { + ImGui.PushFont(font); + + ImGui.PushStyleVar(ImGuiStyleVar.FrameRounding, 0.0f); + ImGui.PushStyleVar(ImGuiStyleVar.WindowRounding, 0.0f); + ImGui.PushStyleVar(ImGuiStyleVar.FrameBorderSize, 1.0f); + ImGui.PushStyleColor(ImGuiCol.WindowBg, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); + + var title_bar = new Num.Vector4(0.65f, 0.65f, 0.65f, 1f); + ImGui.PushStyleColor(ImGuiCol.TitleBg, title_bar); + ImGui.PushStyleColor(ImGuiCol.TitleBgActive, title_bar); + ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, title_bar); + + ImGui.PushStyleColor(ImGuiCol.Border, new Num.Vector4(0f, 0f, 0f, 1f)); + ImGui.PushStyleColor(ImGuiCol.BorderShadow, new Num.Vector4(0f, 0f, 0f, 0.5f)); + + + + ImGui.PushStyleColor(ImGuiCol.Button, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); + ImGui.PushStyleColor(ImGuiCol.Text, new Num.Vector4(0f, 0f, 0f, 1f)); + ImGui.Begin(title, ref show); + + + ImGui.TextWrapped(currentNode.data.response); + if ((currentNode.children != null) && currentNode.children.Length > 0) + { + foreach (Node child in currentNode.children) + { + if (ImGui.Button(child.data.choice)) + { + return child; + } + } + } + else + { + if (ImGui.Button("Okay")) + { + show = false; + paused = false; + //return null; + } + } + + if (currentNode.data.response == null) + { + show = false; + paused = false; + //return null; + + } + ImGui.End(); + ImGui.PopStyleVar(3); + ImGui.PopStyleColor(8); + ImGui.PopFont(); + } + return currentNode; + + } + } + } diff --git a/isometric-park-fna/FNAGame.cs b/isometric-park-fna/FNAGame.cs --- a/isometric-park-fna/FNAGame.cs +++ b/isometric-park-fna/FNAGame.cs @@ -15,7 +15,6 @@ using static isometricparkfna.TileMap; using isometricparkfna.Utils; -using Num = System.Numerics; @@ -73,6 +72,7 @@ private bool showGrid = true; private string output; + private bool showSecond = true; private static void Main(string[] args) { @@ -776,60 +776,11 @@ // new DialogOption{ response="Make sure that you keep visitors happy and the budget in the black! You're currently getting an annual grant out of my budget—it'd sure be nice if you park were self-sufficient so we could drop that expense!", choice="And I need to keep the forest healthy, too, right?" }, // new DialogOption{ response="Oh yeah, of course.", choice="..." }}; - if (showInitial) - { - ImGui.PushFont(debugWindow.monoFont); - - ImGui.PushStyleVar(ImGuiStyleVar.FrameRounding, 0.0f); - ImGui.PushStyleVar(ImGuiStyleVar.WindowRounding, 0.0f); - ImGui.PushStyleVar(ImGuiStyleVar.FrameBorderSize, 1.0f); - ImGui.PushStyleColor(ImGuiCol.WindowBg, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); - - var title_bar = new Num.Vector4(0.65f, 0.65f, 0.65f, 1f); - ImGui.PushStyleColor(ImGuiCol.TitleBg, title_bar); - ImGui.PushStyleColor(ImGuiCol.TitleBgActive, title_bar); - ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, title_bar); - - ImGui.PushStyleColor(ImGuiCol.Border, new Num.Vector4(0f, 0f, 0f, 1f)); - ImGui.PushStyleColor(ImGuiCol.BorderShadow, new Num.Vector4(0f, 0f, 0f, 0.5f)); - - - - ImGui.PushStyleColor(ImGuiCol.Button, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); - ImGui.PushStyleColor(ImGuiCol.Text, new Num.Vector4(0f, 0f, 0f, 1f)); - ImGui.Begin("The Governor", ref showInitial); - - ImGui.TextWrapped(currentNode.data.response); - if ((currentNode.children != null) && currentNode.children.Length > 0) - { - foreach (Node child in currentNode.children) - { - if (ImGui.Button(child.data.choice)) - { - currentNode = child; - } - } - } - else - { - if (ImGui.Button("Okay")) { - this.showInitial = false; - this.simulation.paused = false; - } - } + this.currentNode = DialogInterface.RenderDialog("The Governor", ref this.showInitial, + ref this.simulation.paused, debugWindow.monoFont, this.currentNode); - if (currentNode.data.response == null) - { - this.showInitial = false; - this.simulation.paused = false; - - } - ImGui.End(); - ImGui.PopStyleVar(3); - ImGui.PopStyleColor(8); - ImGui.PopFont(); - } + _imGuiRenderer.AfterLayout(); diff --git a/isometric-park-fna/isometric-park-fna.csproj b/isometric-park-fna/isometric-park-fna.csproj --- a/isometric-park-fna/isometric-park-fna.csproj +++ b/isometric-park-fna/isometric-park-fna.csproj @@ -29,6 +29,7 @@ 8.0 true false +