Example #1
0
        protected override void Enable(BaseMightyMember mightyMember, HelpBoxAttribute attribute)
        {
            base.Enable(mightyMember, attribute);

            if (!mightyMember.GetBoolInfo(attribute.Target, attribute.VisibleCallback, out var visibleInfo))
            {
                visibleInfo = new MightyInfo <bool>(true);
            }

            m_helpBoxCache[mightyMember] = visibleInfo;
        }
Example #2
0
        protected override void Enable(BaseMightyMember mightyMember, TitleAttribute attribute)
        {
            base.Enable(mightyMember, attribute);

            if (!attribute.TitleAsCallback ||
                !mightyMember.GetInfoFromMember <string>(attribute.Target, attribute.Title, out var headerInfo))
            {
                headerInfo = new MightyInfo <string>(attribute.Title);
            }

            m_headerCache[mightyMember] = headerInfo;
        }
Example #3
0
        protected override void EnableSerializeFieldDrawer(MightySerializedField serializedField, T attribute)
        {
            var property = serializedField.Property;

            if (!serializedField.GetInfoFromMember <ArrayOption>(attribute.Target, attribute.OptionsCallback, out var optionsInfo))
            {
                optionsInfo = new MightyInfo <ArrayOption>(attribute.Options);
            }

            if (!serializedField.TryGetAttributes <BaseArrayDecoratorAttribute>(out var decoratorAttributes))
            {
                decoratorAttributes = new BaseArrayDecoratorAttribute[0];
            }

            m_optionsCache[serializedField]     = optionsInfo;
            m_decorationsCache[serializedField] = decoratorAttributes;
        }