Esempio n. 1
0
        protected ActionType(int _index, string _name, ModKey _defaultKey = null, String _group = "NONE", InputType _inputType = InputType.Down, bool _modular = false)
        {
            index       = _index;
            name        = _name;
            subscribers = new List <Action> ();
            if (_defaultKey == null)
            {
                defaultKey = ModKey.none;
                currentKey = ModKey.none;
            }
            else
            {
                defaultKey = _defaultKey;
                currentKey = _defaultKey;
            }

            if (_group.Equals("NONE"))
            {
                group = name;
            }
            else
            {
                group = _group;
            }
            inputType = _inputType;
            modular   = _modular;
        }
Esempio n. 2
0
        public override bool Equals(System.Object obj)
        {
            ModKey other = obj as ModKey;

            if (other == null)
            {
                return(false);
            }
            else
            {
                return(key == other.key &&
                       shift == other.shift &&
                       ctrl == other.ctrl &&
                       alt == other.alt);
            }
        }
Esempio n. 3
0
        public ModKey[] ModularCopy()
        {
            ModKey[] modularKeys = new ModKey[4];
            this.alt             = false;
            this.ctrl            = false;
            this.shift           = false;
            modularKeys[0]       = this;
            modularKeys[1]       = this.Copy();
            modularKeys[1].shift = true;
            modularKeys[2]       = this.Copy();
            modularKeys[2].ctrl  = true;
            modularKeys[3]       = this.Copy();
            modularKeys[3].alt   = true;

            return(modularKeys);
        }
Esempio n. 4
0
 private RTS(int _index, string _name, ModKey _defaultKey = null, String _group = "NONE", InputType _inputType = InputType.Down, bool _modular = false) : base(_index, _name, _defaultKey, _group, _inputType, _modular)
 {
 }