mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 23:50:29 +01:00
ImportPath option enabled based on if there are any paths to import
This commit is contained in:
parent
aac76cb79d
commit
802fe37a5f
1 changed files with 5 additions and 6 deletions
|
|
@ -18,7 +18,7 @@ namespace SceneManager.Menus
|
||||||
internal static UIMenuItem ExportPath { get; } = new UIMenuItem("Export Paths", "Export selected paths to ~b~plugins/SceneManager/Saved Paths");
|
internal static UIMenuItem ExportPath { get; } = new UIMenuItem("Export Paths", "Export selected paths to ~b~plugins/SceneManager/Saved Paths");
|
||||||
internal static UIMenuItem DeleteAllPaths { get; } = new UIMenuItem("Delete All Paths");
|
internal static UIMenuItem DeleteAllPaths { get; } = new UIMenuItem("Delete All Paths");
|
||||||
internal static UIMenuListScrollerItem<string> EditPath { get; private set; }
|
internal static UIMenuListScrollerItem<string> EditPath { get; private set; }
|
||||||
internal static UIMenuCheckboxItem DisableAllPaths { get; } = new UIMenuCheckboxItem("Disable All Paths", false);
|
internal static UIMenuCheckboxItem DisableAllPaths { get; } = new UIMenuCheckboxItem("Disable All Path Collection", false);
|
||||||
|
|
||||||
internal static void Initialize()
|
internal static void Initialize()
|
||||||
{
|
{
|
||||||
|
|
@ -39,7 +39,7 @@ namespace SceneManager.Menus
|
||||||
CreateNewPath.ForeColor = Color.Gold;
|
CreateNewPath.ForeColor = Color.Gold;
|
||||||
Menu.AddItem(ImportPath);
|
Menu.AddItem(ImportPath);
|
||||||
ImportPath.ForeColor = Color.Gold;
|
ImportPath.ForeColor = Color.Gold;
|
||||||
ImportPath.Enabled = PathManager.ImportedPaths.Count > 0;
|
ImportPath.Enabled = ImportPathMenu.ImportedFileNames.Count > 0;
|
||||||
Menu.AddItem(ExportPath);
|
Menu.AddItem(ExportPath);
|
||||||
ExportPath.ForeColor = Color.Gold;
|
ExportPath.ForeColor = Color.Gold;
|
||||||
ExportPath.Enabled = PathManager.Paths.Any(x => x != null);
|
ExportPath.Enabled = PathManager.Paths.Any(x => x != null);
|
||||||
|
|
@ -62,7 +62,7 @@ namespace SceneManager.Menus
|
||||||
DeleteAllPaths.Enabled = false;
|
DeleteAllPaths.Enabled = false;
|
||||||
DisableAllPaths.Enabled = false;
|
DisableAllPaths.Enabled = false;
|
||||||
}
|
}
|
||||||
if(PathManager.ImportedPaths.Count == 0)
|
if(ImportPathMenu.ImportedFileNames.Count == 0)
|
||||||
{
|
{
|
||||||
ImportPath.Enabled = false;
|
ImportPath.Enabled = false;
|
||||||
}
|
}
|
||||||
|
|
@ -95,10 +95,9 @@ namespace SceneManager.Menus
|
||||||
if (selectedItem == DeleteAllPaths)
|
if (selectedItem == DeleteAllPaths)
|
||||||
{
|
{
|
||||||
PathManager.DeleteAllPaths();
|
PathManager.DeleteAllPaths();
|
||||||
DisableAllPaths.Checked = false;
|
PathManager.LoadedFiles.Clear();
|
||||||
Build();
|
MenuManager.BuildMenus();
|
||||||
Menu.Visible = true;
|
Menu.Visible = true;
|
||||||
BarrierMenu.Build();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue