diff --git a/isometric-park-fna/Engines/InputEngine.cs b/isometric-park-fna/Engines/InputEngine.cs --- a/isometric-park-fna/Engines/InputEngine.cs +++ b/isometric-park-fna/Engines/InputEngine.cs @@ -146,11 +146,6 @@ #endif #endregion gamerate_keys #region misc_keys - if (keyboardCur.IsKeyDown(Keys.OemBackslash) && keyboardPrev.IsKeyUp(Keys.OemBackslash)) - { - SendMessage(new ToggleWindowTypeMessage{Window = Window.Debug}); - - } if (keyboardCur.IsKeyDown(Keys.B) && keyboardPrev.IsKeyUp(Keys.B)) { SendMessage(new ToggleWindowTypeMessage{Window = Window.Budget}); @@ -192,6 +187,12 @@ } } + if (keyboardCur.IsKeyDown(Keys.OemBackslash) && keyboardPrev.IsKeyUp(Keys.OemBackslash)) + { + SendMessage(new ToggleWindowTypeMessage{Window = Window.Debug}); + + } + if (keyboardCur.IsKeyDown(Keys.Q) && keyboardPrev.IsKeyUp(Keys.Q)) { System.Console.WriteLine("Quitting"); 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 @@ -856,7 +856,6 @@ Vector2 middle_dimensions = largeMonoFont.MeasureString("Isometric Park"); float middle_start = (int)((FNAGame.width / 2) - (middle_dimensions.X / 2)); - // ImGui.SetNextWindowPos(new Num.Vector2(((FNAGame.width/2) - 40), 200)); batch.DrawString(largeMonoFont, "Isometric Park", new Vector2(middle_start, 50), Color.Black, 0.0f, Vector2.Zero, 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 @@ -99,7 +99,7 @@ break; case Window.MainMenu: - MainMenu.Render(this.BridgeEngine.font, this.BridgeEngine); + MainMenu.Render(this.BridgeEngine.font, this.BridgeEngine, width); break; case Window.InGameMenu: InGameMenu.Render(this.BridgeEngine.font, this.BridgeEngine, width); diff --git a/isometric-park-fna/UI/MainMenu.cs b/isometric-park-fna/UI/MainMenu.cs --- a/isometric-park-fna/UI/MainMenu.cs +++ b/isometric-park-fna/UI/MainMenu.cs @@ -13,7 +13,7 @@ public static class MainMenu { - public static void Render(ImFontPtr font, ImGuiWindowBridgeEngine bridgeEngine) + public static void Render(ImFontPtr font, ImGuiWindowBridgeEngine bridgeEngine, int width) { //Has to go first so the measurement is correct: ImGui.PushFont(font); @@ -28,6 +28,8 @@ StyleSets.defaultSet.push(); + ImGui.SetNextWindowPos(new Num.Vector2(((width/2) - 40), 200)); + ImGui.Begin("##Toolbar", ref newShow, ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoTitleBar); if (ImGui.Button("New Game", button_size)) diff --git a/isometric-park-fna/UI/NewGameWindow.cs b/isometric-park-fna/UI/NewGameWindow.cs --- a/isometric-park-fna/UI/NewGameWindow.cs +++ b/isometric-park-fna/UI/NewGameWindow.cs @@ -142,13 +142,13 @@ ImGui.SameLine(); - if (ImGui.Button("")) + if (ImGui.Button("Custom Title...")) { NewGameWindow.showModal = true; - ImGui.OpenPopup("XYZCustom"); + ImGui.OpenPopup("Custom"); } - if (ImGui.BeginPopup("XYZCustom" /*, ref showModal*/)) + if (ImGui.BeginPopup("Custom" /*, ref showModal*/)) { int newCustomTitlePos = NewGameWindow.customTitlePos; unsafe {