1.8.0: Added target frame rate and PlayerPrefs.Delete to toolbar

- Added: Tooltips on all buttons and labels in toolbar tools
- Added: Target frame rate with `[min;max]` slider in toolbar
- Added: `PlayerPrefs` delete button added to toolbar
- Added: Option to select Single/Additive scene load/unload to scene picker
- Added: All `IToolbarSettings` will be grouped with a foldout-toggle in Preferences
This commit is contained in:
Anders Ejlersen 2022-12-07 22:10:09 +01:00
parent 10d07b986f
commit fe82c5c9fa
22 changed files with 669 additions and 48 deletions

View file

@ -23,10 +23,14 @@ namespace Module.NavigationTool.Editor.Toolbar
if (!IS_DIRTY)
return;
const string TOOLTIP = "Build project with current EditorBuildSettings and target platform";
const string TOOLTIP_RUN = "Build & Run project with current EditorBuildSettings and target platform";
const string TOOLTIP_PLATFORM = "Select build or build & run options";
BUTTON_LIST = new[]
{
new GUIContent("Build"),
new GUIContent("Build & Run")
new GUIContent("Build", TOOLTIP),
new GUIContent("Build & Run", TOOLTIP_RUN)
};
CONTENT_LIST = new[]
@ -35,7 +39,8 @@ namespace Module.NavigationTool.Editor.Toolbar
new GUIContent("Build and Run")
};
DROPDOWN = EditorGUIUtility.IconContent("d_icon dropdown");
GUIContent iconContent = EditorGUIUtility.IconContent("d_icon dropdown");
DROPDOWN = new GUIContent(iconContent.image, TOOLTIP_PLATFORM);
IS_DIRTY = false;
}
@ -59,7 +64,7 @@ namespace Module.NavigationTool.Editor.Toolbar
BuildPlayerWindow.DefaultBuildMethods.BuildPlayer(options);
}
if (GUI.Button(rect1, DROPDOWN, styles.button))
if (GUI.Button(rect1, DROPDOWN, styles.buttonNoPadding))
{
// Note: Do not discard the parameters: userData and options, since they throw an error in 2019, if there are two of them
EditorUtility.DisplayCustomMenu(rect, CONTENT_LIST, currentSelected, (userData, options, selected) =>