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:
parent
10d07b986f
commit
fe82c5c9fa
22 changed files with 669 additions and 48 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.NavigationTool.Editor.Toolbar
|
||||
{
|
||||
|
|
@ -11,6 +12,12 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
public GUIStyle label;
|
||||
public GUIStyle labelCenter;
|
||||
public GUIStyle settingsGroup;
|
||||
public GUIStyle centeredMiniLabel;
|
||||
|
||||
public GUIContent iconPlusSmall;
|
||||
public GUIContent iconPlusTiny;
|
||||
public GUIContent iconDisconnect;
|
||||
|
||||
private GUISkin skin;
|
||||
|
||||
public void Initialize(GUISkin skin)
|
||||
|
|
@ -24,6 +31,16 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
slider = new GUIStyle(skin.FindStyle("ToolbarSlider"));
|
||||
label = new GUIStyle(skin.FindStyle("ToolbarLabel"));
|
||||
|
||||
if (EditorGUIUtility.isProSkin)
|
||||
{
|
||||
centeredMiniLabel = EditorStyles.centeredGreyMiniLabel;
|
||||
}
|
||||
else
|
||||
{
|
||||
centeredMiniLabel = new GUIStyle(EditorStyles.centeredGreyMiniLabel);
|
||||
centeredMiniLabel.normal.textColor = label.normal.textColor;
|
||||
}
|
||||
|
||||
buttonNoPadding = new GUIStyle(skin.FindStyle("toolbarbutton"))
|
||||
{
|
||||
padding = new RectOffset()
|
||||
|
|
@ -38,6 +55,10 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
{
|
||||
margin = new RectOffset(8, 0, 8, 0)
|
||||
};
|
||||
|
||||
iconPlusSmall = EditorGUIUtility.IconContent("d_CreateAddNew");
|
||||
iconPlusTiny = EditorGUIUtility.IconContent("Toolbar Plus");
|
||||
iconDisconnect = EditorGUIUtility.IconContent("d_CacheServerDisconnected");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue