1.2.0: added TimeScale to toolbar
This commit is contained in:
parent
9802f8aaa3
commit
65ca5dd355
6 changed files with 52 additions and 3 deletions
|
|
@ -7,16 +7,17 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
private const string PREF_IS_UI_ENABLED = "ToolbarSettings_IsUiEnabled";
|
||||
private const string PREF_IS_UI_LAYER_ENABLED = "ToolbarSettings_IsUiLayerEnabled";
|
||||
private const string PREF_IS_SCENE_ENABLED = "ToolbarSettings_IsSceneEnabled";
|
||||
private const string PREF_IS_TIME_SCALE_ENABLED = "ToolbarSettings.IsTimeScaleEnabled";
|
||||
|
||||
public static bool IsUiEnabled
|
||||
{
|
||||
get => EditorPrefs.GetBool(PREF_IS_UI_ENABLED, true);
|
||||
get => EditorPrefs.GetBool(PREF_IS_UI_ENABLED, false);
|
||||
set => EditorPrefs.SetBool(PREF_IS_UI_ENABLED, value);
|
||||
}
|
||||
|
||||
public static bool IsUiLayerEnabled
|
||||
{
|
||||
get => EditorPrefs.GetBool(PREF_IS_UI_LAYER_ENABLED, true);
|
||||
get => EditorPrefs.GetBool(PREF_IS_UI_LAYER_ENABLED, false);
|
||||
set => EditorPrefs.SetBool(PREF_IS_UI_LAYER_ENABLED, value);
|
||||
}
|
||||
|
||||
|
|
@ -25,5 +26,11 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
get => EditorPrefs.GetBool(PREF_IS_SCENE_ENABLED, true);
|
||||
set => EditorPrefs.SetBool(PREF_IS_SCENE_ENABLED, value);
|
||||
}
|
||||
|
||||
public static bool IsTimeScaleEnabled
|
||||
{
|
||||
get => EditorPrefs.GetBool(PREF_IS_TIME_SCALE_ENABLED, false);
|
||||
set => EditorPrefs.SetBool(PREF_IS_TIME_SCALE_ENABLED, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -34,6 +34,10 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Scene", EditorStyles.boldLabel);
|
||||
ToolbarSettings.IsSceneEnabled = EditorGUILayout.Toggle("Enable Scene picker", ToolbarSettings.IsSceneEnabled);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Time", EditorStyles.boldLabel);
|
||||
ToolbarSettings.IsTimeScaleEnabled = EditorGUILayout.Toggle("Enable Time Scale slider", ToolbarSettings.IsTimeScaleEnabled);
|
||||
}
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue