Scene Picker: Modified scene groups to contain LoadAsGroup, SortAsGroup and SortInSubmenuAsGroup
### Changed - Scene groups to contain three different types of behaviours for grouping: - Load As Group: Groups all scenes into a single entry - Sort As Group: Sorts all scenes into entries close to each other in the dropdown - Sort In Submenu As Group: Sorts all scenes into entries in a submenu ### Removed - Removed "Scene sorting by Asset label" groups
This commit is contained in:
parent
a7cb8e885b
commit
dd80d46ebb
11 changed files with 128 additions and 71 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Module.NavigationTool.Editor.Toolbar
|
||||
{
|
||||
|
|
@ -8,7 +7,6 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
public string Title => "Scene";
|
||||
public bool IsSettingsDirty { get; private set; }
|
||||
|
||||
private StringReorderableListDrawer assetLabelList;
|
||||
private SceneGroupReorderableListDrawer sceneGroupList;
|
||||
|
||||
private ToolbarProjectSettings projectSettings;
|
||||
|
|
@ -19,18 +17,14 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
this.projectSettings = projectSettings;
|
||||
settings = projectSettings.GetValueAs<Settings>();
|
||||
|
||||
assetLabelList = new StringReorderableListDrawer(settings.labels, "Scene sorting by Asset label");
|
||||
assetLabelList.onChanged += ToolScenePicker.SetAsDirty;
|
||||
|
||||
sceneGroupList = new SceneGroupReorderableListDrawer(settings.sceneGroups.groups, "Scene groups");
|
||||
sceneGroupList.onChanged += ToolScenePicker.SetAsDirty;
|
||||
}
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
assetLabelList.DoLayoutList();
|
||||
sceneGroupList.DoLayoutList();
|
||||
IsSettingsDirty = assetLabelList.IsDirty || sceneGroupList.IsDirty;
|
||||
IsSettingsDirty = sceneGroupList.IsDirty;
|
||||
}
|
||||
|
||||
public void SetSettingsValue()
|
||||
|
|
@ -41,7 +35,6 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
[Serializable]
|
||||
public sealed class Settings
|
||||
{
|
||||
public List<string> labels = new();
|
||||
public SceneGroupArray sceneGroups = new();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue