module-navigation-tool/Editor/History/Window/Styles/Styles.cs
Anders Ejlersen 5a2dcf3619 1.8.4: History received a fix for startup issue, increased entry size, and context menu options
- Set selection active in history is now a toggleable feature in the context menu
- Increased number of entries in history from 32 to 64
- Clear entries moved to context menu in history
- Fixed issue, where history didn't work on first startup
2023-03-27 22:02:44 +02:00

37 lines
1.1 KiB
C#

using UnityEditor;
using UnityEngine;
namespace Module.NavigationTool.Editor.History
{
internal sealed class Styles
{
public GUIStyle toolbox;
public GUIStyle entry;
public GUIStyle invalidEntry;
public GUIContent iconSearch;
private GUISkin skin;
public void Initialize(GUISkin skin)
{
if (this.skin == skin)
return;
this.skin = skin;
toolbox = new GUIStyle(skin.box);
entry = new GUIStyle(skin.label);
entry.hover.textColor = entry.onHover.textColor = Color.white;
entry.active.textColor = entry.onActive.textColor = Color.yellow;
invalidEntry = new GUIStyle(entry);
invalidEntry.normal.textColor = Color.red;
invalidEntry.hover.textColor = invalidEntry.onHover.textColor = new Color(1.0f, 0.3f, 0.3f);
invalidEntry.active.textColor = invalidEntry.onActive.textColor = new Color(1.0f, 0.0f, 0.5f);
iconSearch = EditorGUIUtility.IconContent("d_Search Icon");
}
}
}