Esempio n. 1
0
        protected Button(MethodInfo method, ButtonAttribute buttonAttribute)
        {
            DisplayName = string.IsNullOrEmpty(buttonAttribute.Name)
                ? ObjectNames.NicifyVariableName(method.Name)
                : buttonAttribute.Name;

            Method = method;

            _spacing = buttonAttribute.Spacing;

            bool inAppropriateMode = EditorApplication.isPlaying
                ? buttonAttribute.Mode == ButtonMode.EnabledInPlayMode
                : buttonAttribute.Mode == ButtonMode.DisabledInPlayMode;

            _disabled = !(buttonAttribute.Mode == ButtonMode.AlwaysEnabled || inAppropriateMode);
        }
Esempio n. 2
0
 public ButtonAttribute(ButtonSpacing spacing)
 {
     this.spacing = spacing;
 }
Esempio n. 3
0
 public ButtonAttribute(string name, ButtonMode mode, ButtonSpacing spacing)
 {
     this.name    = name;
     this.mode    = mode;
     this.spacing = spacing;
 }
Esempio n. 4
0
 public EasyButtonAttribute(string name, ButtonSpacing spacing)
 {
     this.name    = name;
     this.spacing = spacing;
 }