Merge pull request #57 from lunalunachi/add-builtin-longdrawer

Add LongDrawer
This commit is contained in:
VladV 2022-12-06 20:17:43 +04:00 committed by GitHub
commit 5b7697b59f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@ using UnityEditor;
using UnityEngine;
[assembly: RegisterTriValueDrawer(typeof(IntegerDrawer), TriDrawerOrder.Fallback)]
[assembly: RegisterTriValueDrawer(typeof(LongDrawer), TriDrawerOrder.Fallback)]
[assembly: RegisterTriValueDrawer(typeof(BooleanDrawer), TriDrawerOrder.Fallback)]
[assembly: RegisterTriValueDrawer(typeof(FloatDrawer), TriDrawerOrder.Fallback)]
[assembly: RegisterTriValueDrawer(typeof(StringDrawer), TriDrawerOrder.Fallback)]
@ -49,7 +50,13 @@ namespace TriInspector.Drawers
return EditorGUI.IntField(position, label, value);
}
}
public class LongDrawer : BuiltinDrawerBase<long>
{
protected override long OnValueGUI(Rect position, GUIContent label, long value)
{
return EditorGUI.LongField(position, label, value);
}
}
public class FloatDrawer : BuiltinDrawerBase<float>
{
protected override float OnValueGUI(Rect position, GUIContent label, float value)