From e8c5e2ca698ff8179c0b85588f9a433a6b4a4000 Mon Sep 17 00:00:00 2001 From: Rich Dunne Date: Wed, 26 Aug 2020 19:51:13 -0600 Subject: [PATCH] Fixed PathMainMenu not functioning correctly after finishing a path --- SceneManager/Menus/PathCreationMenu.cs | 9 +++++---- SceneManager/Menus/PathMainMenu.cs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/SceneManager/Menus/PathCreationMenu.cs b/SceneManager/Menus/PathCreationMenu.cs index 6bf27a0..245a6f7 100644 --- a/SceneManager/Menus/PathCreationMenu.cs +++ b/SceneManager/Menus/PathCreationMenu.cs @@ -173,10 +173,11 @@ namespace SceneManager } MenuManager.menuPool.CloseAllMenus(); - pathCreationMenu.Reset(true, true); // Trying to see if we can get away with resetting the menu instead of rebuilding it - //PathMainMenu.pathMainMenu.Clear(); - //PathMainMenu.BuildPathMenu(); - //trafficEndPath.Enabled = false; + //pathCreationMenu.Reset(true, true); // Trying to see if we can get away with resetting the menu instead of rebuilding it + PathMainMenu.createNewPath.Text = "Create New Path"; + PathMainMenu.pathMainMenu.Clear(); + PathMainMenu.BuildPathMenu(); + trafficEndPath.Enabled = false; PathMainMenu.pathMainMenu.Visible = true; break; } diff --git a/SceneManager/Menus/PathMainMenu.cs b/SceneManager/Menus/PathMainMenu.cs index ad5223b..2adf15e 100644 --- a/SceneManager/Menus/PathMainMenu.cs +++ b/SceneManager/Menus/PathMainMenu.cs @@ -11,7 +11,7 @@ namespace SceneManager { public static UIMenu pathMainMenu { get; private set; } public static UIMenuItem createNewPath { get; private set; } - private static UIMenuItem deleteAllPaths; + public static UIMenuItem deleteAllPaths; public static UIMenuListScrollerItem editPath { get; private set; } public static UIMenuListScrollerItem directOptions { get; private set; } public static UIMenuListScrollerItem directDriver { get; private set; }