Renamed all attributes and drawers to have postfix of either Attribute or AttributeDrawer

This commit is contained in:
Anders Ejlersen 2021-12-04 12:47:44 +01:00
parent 81bac32538
commit dc15bfec81
161 changed files with 265 additions and 265 deletions

View file

@ -3,15 +3,15 @@ using UnityEngine;
namespace Module.Inspector.Editor
{
[CustomPropertyDrawer(typeof(HorizontalLine))]
public sealed class DrawerHorizontalLine : DecoratorDrawer
[CustomPropertyDrawer(typeof(HorizontalLineAttribute))]
public sealed class HorizontalLineAttributeDrawer : DecoratorDrawer
{
private const float LINE_HEIGHT = 1.0f;
private const float VERTICAL_SPACING = 4.0f;
public override void OnGUI(Rect position)
{
var att = (HorizontalLine)attribute;
var att = (HorizontalLineAttribute)attribute;
// Title
if (!string.IsNullOrEmpty(att.title))

View file

@ -3,12 +3,12 @@ using UnityEngine;
namespace Module.Inspector.Editor
{
[CustomMethodDrawer(typeof(MethodHeader))]
public sealed class DrawerMethodHeader : DecoratorMethodDrawer
[CustomMethodDrawer(typeof(MethodHeaderAttribute))]
public sealed class MethodHeaderAttributeDrawer : DecoratorMethodDrawer
{
public override bool Draw(Rect position, DecoratorMethodAttribute attribute)
{
var att = (MethodHeader)attribute;
var att = (MethodHeaderAttribute)attribute;
if (string.IsNullOrEmpty(att.title))
return false;
@ -25,7 +25,7 @@ namespace Module.Inspector.Editor
public override float GetHeight(DecoratorMethodAttribute attribute)
{
var att = (MethodHeader)attribute;
var att = (MethodHeaderAttribute)attribute;
return !string.IsNullOrEmpty(att.title) ? EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing : 0.0f;
}
}