Renamed all attributes and drawers to have postfix of either Attribute or AttributeDrawer
This commit is contained in:
parent
81bac32538
commit
dc15bfec81
161 changed files with 265 additions and 265 deletions
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Disable))]
|
||||
internal sealed class DrawerDisable : AccessModifierPropertyDrawer
|
||||
[CustomPropertyDrawer(typeof(DisableAttribute))]
|
||||
internal sealed class DisableAttributeDrawer : AccessModifierPropertyDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierPropertyAttribute attribute, SerializedProperty property, EAccessType currentAccessType)
|
||||
{
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(DisableField))]
|
||||
internal sealed class DrawerDisableField : AccessModifierPropertyDrawer
|
||||
[CustomPropertyDrawer(typeof(DisableFieldAttribute))]
|
||||
internal sealed class DisableFieldAttributeDrawer : AccessModifierPropertyDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierPropertyAttribute attribute, SerializedProperty property, EAccessType currentAccessType)
|
||||
{
|
||||
var att = (DisableField)attribute;
|
||||
var att = (DisableFieldAttribute)attribute;
|
||||
|
||||
if (currentAccessType == EAccessType.Enabled && property.IsSiblingValue(att.fieldName, att.fieldValue, att.useFieldValue))
|
||||
currentAccessType = EAccessType.ReadOnly;
|
||||
|
|
@ -3,8 +3,8 @@ using UnityEngine;
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(DisableFieldInPlayMode))]
|
||||
internal sealed class DrawerDisableFieldInPlayMode : AccessModifierPropertyDrawer
|
||||
[CustomPropertyDrawer(typeof(DisableFieldInPlayModeAttribute))]
|
||||
internal sealed class DisableFieldInPlayModeAttributeDrawer : AccessModifierPropertyDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierPropertyAttribute attribute, SerializedProperty property, EAccessType currentAccessType)
|
||||
{
|
||||
|
|
@ -4,12 +4,12 @@ using UnityEngine;
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomMethodDrawer(typeof(DisableMethod))]
|
||||
internal sealed class DrawerDisableMethod : AccessModifierMethodDrawer
|
||||
[CustomMethodDrawer(typeof(DisableMethodAttribute))]
|
||||
internal sealed class DisableMethodAttributeDrawer : AccessModifierMethodDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierMethodAttribute attribute, Object target, MethodInfo methodInfo, EAccessType currentAccessType)
|
||||
{
|
||||
var att = (DisableMethod)attribute;
|
||||
var att = (DisableMethodAttribute)attribute;
|
||||
|
||||
if (currentAccessType == EAccessType.Enabled && EditorSerializedPropertyUtility.IsValue(target, att.fieldName, att.fieldValue, att.useFieldValue))
|
||||
currentAccessType = EAccessType.ReadOnly;
|
||||
|
|
@ -3,8 +3,8 @@ using UnityEngine;
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomMethodDrawer(typeof(DisableMethodInPlayMode))]
|
||||
internal sealed class DrawerDisableMethodInPlayMode : AccessModifierMethodDrawer
|
||||
[CustomMethodDrawer(typeof(DisableMethodInPlayModeAttribute))]
|
||||
internal sealed class DisableMethodInPlayModeAttributeDrawer : AccessModifierMethodDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierMethodAttribute attribute, Object target, MethodInfo methodInfo, EAccessType currentAccessType)
|
||||
{
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(EnableField))]
|
||||
internal sealed class DrawerEnableField : AccessModifierPropertyDrawer
|
||||
[CustomPropertyDrawer(typeof(EnableFieldAttribute))]
|
||||
internal sealed class EnableFieldAttributeDrawer : AccessModifierPropertyDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierPropertyAttribute attribute, SerializedProperty property, EAccessType currentAccessType)
|
||||
{
|
||||
var att = (EnableField)attribute;
|
||||
var att = (EnableFieldAttribute)attribute;
|
||||
|
||||
if (currentAccessType == EAccessType.Enabled && !property.IsSiblingValue(att.fieldName, att.fieldValue, att.useFieldValue))
|
||||
currentAccessType = EAccessType.ReadOnly;
|
||||
|
|
@ -3,8 +3,8 @@ using UnityEngine;
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(EnableFieldInPlayMode))]
|
||||
internal sealed class DrawerEnableFieldInPlayMode : AccessModifierPropertyDrawer
|
||||
[CustomPropertyDrawer(typeof(EnableFieldInPlayModeAttribute))]
|
||||
internal sealed class EnableFieldInPlayModeAttributeDrawer : AccessModifierPropertyDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierPropertyAttribute attribute, SerializedProperty property, EAccessType currentAccessType)
|
||||
{
|
||||
|
|
@ -4,12 +4,12 @@ using UnityEngine;
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomMethodDrawer(typeof(EnableMethod))]
|
||||
internal sealed class DrawerEnableMethod : AccessModifierMethodDrawer
|
||||
[CustomMethodDrawer(typeof(EnableMethodAttribute))]
|
||||
internal sealed class EnableMethodAttributeDrawer : AccessModifierMethodDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierMethodAttribute attribute, Object target, MethodInfo methodInfo, EAccessType currentAccessType)
|
||||
{
|
||||
var att = (EnableMethod)attribute;
|
||||
var att = (EnableMethodAttribute)attribute;
|
||||
|
||||
if (currentAccessType == EAccessType.Enabled && !EditorSerializedPropertyUtility.IsValue(target, att.fieldName, att.fieldValue, att.useFieldValue))
|
||||
currentAccessType = EAccessType.ReadOnly;
|
||||
|
|
@ -3,8 +3,8 @@ using UnityEngine;
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomMethodDrawer(typeof(EnableMethodInPlayMode))]
|
||||
internal sealed class DrawerEnableMethodInPlayMode : AccessModifierMethodDrawer
|
||||
[CustomMethodDrawer(typeof(EnableMethodInPlayModeAttribute))]
|
||||
internal sealed class EnableMethodInPlayModeAttributeDrawer : AccessModifierMethodDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierMethodAttribute attribute, Object target, MethodInfo methodInfo, EAccessType currentAccessType)
|
||||
{
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(HideField))]
|
||||
internal sealed class DrawerHideField : AccessModifierPropertyDrawer
|
||||
[CustomPropertyDrawer(typeof(HideFieldAttribute))]
|
||||
internal sealed class HideFieldAttributeDrawer : AccessModifierPropertyDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierPropertyAttribute attribute, SerializedProperty property, EAccessType currentAccessType)
|
||||
{
|
||||
|
|
@ -15,7 +15,7 @@ namespace Module.Inspector.Editor
|
|||
|
||||
private static bool GetHideValue(AccessModifierPropertyAttribute attribute, SerializedProperty sp)
|
||||
{
|
||||
var att = (HideField)attribute;
|
||||
var att = (HideFieldAttribute)attribute;
|
||||
return string.IsNullOrEmpty(att.fieldName) || sp.IsSiblingValue(att.fieldName, att.fieldValue, att.useFieldValue);
|
||||
}
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@ using UnityEngine;
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomMethodDrawer(typeof(HideInNormalInspector))]
|
||||
internal sealed class DrawerHideInNormalInspector : AccessModifierMethodDrawer
|
||||
[CustomMethodDrawer(typeof(HideInNormalInspectorAttribute))]
|
||||
internal sealed class HideInNormalInspectorAttributeDrawer : AccessModifierMethodDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierMethodAttribute attribute, Object target, MethodInfo methodInfo, EAccessType currentAccessType)
|
||||
{
|
||||
|
|
@ -4,8 +4,8 @@ using UnityEngine;
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomMethodDrawer(typeof(HideMethod))]
|
||||
internal sealed class DrawerHideMethod : AccessModifierMethodDrawer
|
||||
[CustomMethodDrawer(typeof(HideMethodAttribute))]
|
||||
internal sealed class HideMethodAttributeDrawer : AccessModifierMethodDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierMethodAttribute attribute, Object target, MethodInfo methodInfo, EAccessType currentAccessType)
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@ namespace Module.Inspector.Editor
|
|||
|
||||
private static bool GetHideValue(AccessModifierMethodAttribute attribute, Object target)
|
||||
{
|
||||
var att = (HideMethod)attribute;
|
||||
var att = (HideMethodAttribute)attribute;
|
||||
return string.IsNullOrEmpty(att.fieldName) || EditorSerializedPropertyUtility.IsValue(target, att.fieldName, att.fieldValue, att.useFieldValue);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ShowField))]
|
||||
internal sealed class DrawerShowField : AccessModifierPropertyDrawer
|
||||
[CustomPropertyDrawer(typeof(ShowFieldAttribute))]
|
||||
internal sealed class ShowFieldAttributeDrawer : AccessModifierPropertyDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierPropertyAttribute attribute, SerializedProperty property, EAccessType currentAccessType)
|
||||
{
|
||||
|
|
@ -15,7 +15,7 @@ namespace Module.Inspector.Editor
|
|||
|
||||
private static bool GetVisibleValue(AccessModifierPropertyAttribute attribute, SerializedProperty sp)
|
||||
{
|
||||
var att = (ShowField)attribute;
|
||||
var att = (ShowFieldAttribute)attribute;
|
||||
return sp.IsSiblingValue(att.fieldName, att.fieldValue, att.useFieldValue);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,8 +4,8 @@ using UnityEngine;
|
|||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomMethodDrawer(typeof(ShowMethod))]
|
||||
internal sealed class DrawerShowMethod : AccessModifierMethodDrawer
|
||||
[CustomMethodDrawer(typeof(ShowMethodAttribute))]
|
||||
internal sealed class ShowMethodAttributeDrawer : AccessModifierMethodDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierMethodAttribute attribute, Object target, MethodInfo methodInfo, EAccessType currentAccessType)
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@ namespace Module.Inspector.Editor
|
|||
|
||||
private static bool GetVisibleValue(AccessModifierMethodAttribute attribute, Object target)
|
||||
{
|
||||
var att = (ShowMethod)attribute;
|
||||
var att = (ShowMethodAttribute)attribute;
|
||||
return EditorSerializedPropertyUtility.IsValue(target, att.fieldName, att.fieldValue, att.useFieldValue);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue