### 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
41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using System;
|
|
|
|
namespace Module.NavigationTool.Editor.Toolbar
|
|
{
|
|
internal sealed class ToolbarScenePickerProjectSettings : IToolbarProjectSettings
|
|
{
|
|
public string Title => "Scene";
|
|
public bool IsSettingsDirty { get; private set; }
|
|
|
|
private SceneGroupReorderableListDrawer sceneGroupList;
|
|
|
|
private ToolbarProjectSettings projectSettings;
|
|
private Settings settings;
|
|
|
|
public void Initialize(ToolbarProjectSettings projectSettings)
|
|
{
|
|
this.projectSettings = projectSettings;
|
|
settings = projectSettings.GetValueAs<Settings>();
|
|
|
|
sceneGroupList = new SceneGroupReorderableListDrawer(settings.sceneGroups.groups, "Scene groups");
|
|
sceneGroupList.onChanged += ToolScenePicker.SetAsDirty;
|
|
}
|
|
|
|
public void Draw()
|
|
{
|
|
sceneGroupList.DoLayoutList();
|
|
IsSettingsDirty = sceneGroupList.IsDirty;
|
|
}
|
|
|
|
public void SetSettingsValue()
|
|
{
|
|
projectSettings.SetValue(settings);
|
|
}
|
|
|
|
[Serializable]
|
|
public sealed class Settings
|
|
{
|
|
public SceneGroupArray sceneGroups = new();
|
|
}
|
|
}
|
|
} |