mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Removed RefreshMenu method, replaced with changing createNewPath.Text value
This commit is contained in:
parent
c961bdc6fc
commit
bee2d44c4a
1 changed files with 4 additions and 32 deletions
|
|
@ -10,7 +10,8 @@ namespace SceneManager
|
||||||
static class PathMainMenu
|
static class PathMainMenu
|
||||||
{
|
{
|
||||||
public static UIMenu pathMainMenu { get; private set; }
|
public static UIMenu pathMainMenu { get; private set; }
|
||||||
private static UIMenuItem createNewPath, deleteAllPaths;
|
public static UIMenuItem createNewPath { get; private set; }
|
||||||
|
private static UIMenuItem deleteAllPaths;
|
||||||
public static UIMenuListScrollerItem<int> editPath { get; private set; }
|
public static UIMenuListScrollerItem<int> editPath { get; private set; }
|
||||||
public static UIMenuListScrollerItem<int> directDriver { get; private set; }
|
public static UIMenuListScrollerItem<int> directDriver { get; private set; }
|
||||||
public static UIMenuListScrollerItem<string> dismissDriver { get; private set; }
|
public static UIMenuListScrollerItem<string> dismissDriver { get; private set; }
|
||||||
|
|
@ -82,32 +83,6 @@ namespace SceneManager
|
||||||
pathsNum.Insert(indexToInsertAt, pathNum);
|
pathsNum.Insert(indexToInsertAt, pathNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RefreshMenu()
|
|
||||||
{
|
|
||||||
//trafficRemoveWaypoint.Enabled = true;
|
|
||||||
pathMainMenu.Clear();
|
|
||||||
pathMainMenu.AddItem(createNewPath = new UIMenuItem("Continue Creating Current Path"));
|
|
||||||
createNewPath.ForeColor = Color.Gold;
|
|
||||||
pathMainMenu.AddItem(deleteAllPaths = new UIMenuItem("Delete All Paths"));
|
|
||||||
deleteAllPaths.ForeColor = Color.Gold;
|
|
||||||
pathMainMenu.AddItem(directDriver = new UIMenuListScrollerItem<int>("Direct nearest driver to path", ""));
|
|
||||||
directDriver.ForeColor = Color.Gold;
|
|
||||||
pathMainMenu.AddItem(dismissDriver = new UIMenuListScrollerItem<string>("Dismiss nearest driver", ""));
|
|
||||||
dismissDriver.ForeColor = Color.Gold;
|
|
||||||
|
|
||||||
if (GetPaths().Count == 8)
|
|
||||||
{
|
|
||||||
createNewPath.Enabled = false;
|
|
||||||
}
|
|
||||||
if (GetPaths().Count == 0)
|
|
||||||
{
|
|
||||||
editPath.Enabled = false;
|
|
||||||
deleteAllPaths.Enabled = false;
|
|
||||||
disableAllPaths.Enabled = false;
|
|
||||||
directDriver.Enabled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool VehicleAndDriverValid(this Vehicle v)
|
private static bool VehicleAndDriverValid(this Vehicle v)
|
||||||
{
|
{
|
||||||
if (v && v.HasDriver && v.Driver && v.Driver.IsAlive)
|
if (v && v.HasDriver && v.Driver && v.Driver.IsAlive)
|
||||||
|
|
@ -196,7 +171,7 @@ namespace SceneManager
|
||||||
{
|
{
|
||||||
if (selectedItem == createNewPath)
|
if (selectedItem == createNewPath)
|
||||||
{
|
{
|
||||||
RefreshMenu();
|
createNewPath.Text = "Continue Creating Current Path";
|
||||||
pathMainMenu.Visible = false;
|
pathMainMenu.Visible = false;
|
||||||
PathCreationMenu.pathCreationMenu.Visible = true;
|
PathCreationMenu.pathCreationMenu.Visible = true;
|
||||||
|
|
||||||
|
|
@ -212,11 +187,8 @@ namespace SceneManager
|
||||||
}
|
}
|
||||||
else if (paths.ElementAtOrDefault(i) == null)
|
else if (paths.ElementAtOrDefault(i) == null)
|
||||||
{
|
{
|
||||||
|
// Do we only want to do this once the first waypoint is added?
|
||||||
PathCreationMenu.AddNewPathToPathsCollection(paths, i);
|
PathCreationMenu.AddNewPathToPathsCollection(paths, i);
|
||||||
//Game.LogTrivial($"Creating path {i + 1}");
|
|
||||||
//Game.DisplayNotification($"~o~Scene Manager\n~y~[Creating]~w~ Path {i + 1} started.");
|
|
||||||
//paths.Insert(i, new Path(i + 1, false));
|
|
||||||
//PathCreationMenu.trafficRemoveWaypoint.Enabled = false;
|
|
||||||
|
|
||||||
if (SettingsMenu.debugGraphics.Checked)
|
if (SettingsMenu.debugGraphics.Checked)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue