1.8.3: Added HideLabel attribute

This commit is contained in:
Anders Ejlersen 2023-11-04 17:47:58 +01:00
parent 61c7356b3a
commit 3259b62387
12 changed files with 97 additions and 8 deletions

View file

@ -0,0 +1,39 @@
using UnityEditor;
using UnityEngine;
namespace Module.Inspector.Editor.Utilities
{
internal static class EditorIcons
{
private static GUIContent CONTENT_WARNING;
private static GUIContent CONTENT_ERROR;
private static GUIContent GetWarningIconContent()
{
if (CONTENT_WARNING == null)
CONTENT_WARNING = EditorGUIUtility.IconContent("Warning");
return CONTENT_WARNING;
}
private static GUIContent GetErrorIconContent()
{
if (CONTENT_ERROR == null)
CONTENT_ERROR = EditorGUIUtility.IconContent("Error");
return CONTENT_ERROR;
}
public static void SetWarningIcon(GUIContent content)
{
GUIContent errorContent = GetWarningIconContent();
content.image = errorContent.image;
}
public static void SetErrorIcon(GUIContent content)
{
GUIContent errorContent = GetErrorIconContent();
content.image = errorContent.image;
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 07b74dac541c43cb8a89bd0a1b577ec1
timeCreated: 1699115532