mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 16:28:23 -05:00
23 lines
738 B
C#
23 lines
738 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace TriInspector.Utilities
|
|
{
|
|
public static class TriEditorGUI
|
|
{
|
|
public static void Foldout(Rect rect, TriProperty property)
|
|
{
|
|
var content = property.DisplayNameContent;
|
|
property.IsExpanded = EditorGUI.Foldout(rect, property.IsExpanded, content, true);
|
|
}
|
|
|
|
public static void DrawBox(Rect position, GUIStyle style,
|
|
bool isHover = false, bool isActive = false, bool on = false, bool hasKeyboardFocus = false)
|
|
{
|
|
if (Event.current.type == EventType.Repaint)
|
|
{
|
|
style.Draw(position, GUIContent.none, isHover, isActive, on, hasKeyboardFocus);
|
|
}
|
|
}
|
|
}
|
|
} |