public override void InitDrawer(BaseMightyMember mightyMember, BaseMightyAttribute mightyAttribute) { var attribute = (ProgressBarAttribute)mightyAttribute; var target = mightyMember.InitAttributeTarget <ProgressBarAttribute>(); var colorInfo = EditorDrawUtility.GetColorInfo(mightyMember.Property, target, attribute.ColorName, attribute.Color); m_progressBarCache[mightyMember] = colorInfo; }
public override void InitDrawer(BaseMightyMember mightyMember, BaseMightyAttribute mightyAttribute) { var attribute = (StyleAttribute)mightyAttribute; var target = mightyMember.InitAttributeTarget <StyleAttribute>(); var styleInfo = EditorDrawUtility.GetStyleInfo(mightyMember.Property, target, attribute.StyleName, attribute.EditorStyle); m_styleCache[mightyMember] = styleInfo; }
public override void InitDrawer(BaseMightyMember mightyMember, BaseMightyAttribute mightyAttribute) { var attribute = (InfoBoxAttribute)mightyAttribute; var target = mightyMember.InitAttributeTarget <InfoBoxAttribute>(); if (!mightyMember.Property.GetBoolInfo(target, attribute.VisibleIf, out var visibleInfo)) { visibleInfo = new MightyInfo <bool>(true); } m_infoBoxCache[mightyMember] = visibleInfo; }
public override void InitDrawer(BaseMightyMember mightyMember, BaseMightyAttribute mightyAttribute) { var attribute = (LayoutSpaceAttribute)mightyAttribute; var target = mightyMember.InitAttributeTarget <LayoutSpaceAttribute>(); var property = mightyMember.Property; if (!property.GetInfoFromMember <DecoratorPosition>(target, attribute.PositionName, out var positionInfo, Enum.TryParse)) { positionInfo = new MightyInfo <DecoratorPosition>(attribute.Position); } m_flexibleSpaceCache[mightyMember] = positionInfo; }
public override void InitDrawer(BaseMightyMember mightyMember, BaseMightyAttribute mightyAttribute) { var attribute = (CustomDrawerAttribute)mightyAttribute; var target = mightyMember.InitAttributeTarget <CustomDrawerAttribute>(); if (!mightyMember.Property.isArray || mightyMember.Property.propertyType == SerializedPropertyType.String) { InitCallback(mightyMember, target, attribute, m_propertyCallback); } else { InitCallback(mightyMember, target, attribute, m_elementCallback); InitCallback(mightyMember, target, attribute, m_labelledElementCallback); InitCallback(mightyMember, target, attribute, m_rectElementCallback); InitCallback(mightyMember, target, attribute, m_elementHeightCallback); } }