mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Added error checking for current path name
This commit is contained in:
parent
ac89da6cc8
commit
5aba36f829
1 changed files with 11 additions and 3 deletions
|
|
@ -15,7 +15,7 @@ namespace SceneManager
|
||||||
internal class EditPathMenu
|
internal class EditPathMenu
|
||||||
{
|
{
|
||||||
internal static UIMenu Menu { get; } = new UIMenu("Scene Manager", "~o~Edit Path");
|
internal static UIMenu Menu { get; } = new UIMenu("Scene Manager", "~o~Edit Path");
|
||||||
private static UIMenuCheckboxItem DisablePath { get; } = new UIMenuCheckboxItem("Disable Path", false);
|
private static UIMenuCheckboxItem DisablePath { get; } = new UIMenuCheckboxItem("Disable Path Collection", false);
|
||||||
private static UIMenuItem EditWaypoints { get; } = new UIMenuItem("Edit Waypoints");
|
private static UIMenuItem EditWaypoints { get; } = new UIMenuItem("Edit Waypoints");
|
||||||
private static UIMenuItem DeletePath { get; } = new UIMenuItem("Delete Path");
|
private static UIMenuItem DeletePath { get; } = new UIMenuItem("Delete Path");
|
||||||
private static UIMenuItem ChangePathName { get; } = new UIMenuItem("Change Path Name");
|
private static UIMenuItem ChangePathName { get; } = new UIMenuItem("Change Path Name");
|
||||||
|
|
@ -101,8 +101,16 @@ namespace SceneManager
|
||||||
{
|
{
|
||||||
var scrollerItems = new List<UIMenuScrollerItem> { };
|
var scrollerItems = new List<UIMenuScrollerItem> { };
|
||||||
GameFiber.StartNew(() => UserInput.InitializeMenuMouseControl(menu, scrollerItems), "RNUI Mouse Input Fiber");
|
GameFiber.StartNew(() => UserInput.InitializeMenuMouseControl(menu, scrollerItems), "RNUI Mouse Input Fiber");
|
||||||
|
if (CurrentPath == null)
|
||||||
|
{
|
||||||
|
Menu.SubtitleText = $"~o~Currently editing: ~r~[ERROR GETTING CURRENT PATH]";
|
||||||
|
ChangePathName.Description = $"Change the path name from ~r~[ERROR] ~w~to something else.";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
Menu.SubtitleText = $"~o~Currently editing: ~b~{CurrentPath.Name}";
|
Menu.SubtitleText = $"~o~Currently editing: ~b~{CurrentPath.Name}";
|
||||||
ChangePathName.Description = $"Change the path name from ~b~{CurrentPath.Name} ~w~to something else.";
|
ChangePathName.Description = $"Change the path name from ~b~{CurrentPath.Name} ~w~to something else.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue