예제 #1
0
        public bool AddAxisBind(AxBind axisBind)
        {
            int index = (!string.IsNullOrEmpty(axisBind.name)) ? KeyBinds.FindIndex(kb => kb.name == axisBind.name) : -1;

            if (index < 0)
            {
                AxisBinds.Add(axisBind);
                if (updateText)
                {
                    UpdateCurrentKeyBindText();
                }
                return(true);
            }
            return(false);
        }
예제 #2
0
        public bool AddKeyBind(KBind kBind)
        {
            int         index        = (!string.IsNullOrEmpty(kBind.name)) ? KeyBinds.FindIndex(kb => kb.name == kBind.name) : -1;
            KBindChange kindOfChange = KBindChange.Add;

            if (index >= 0)
            {
                kindOfChange = KBindChange.Update;                 // will cause lists to Remove then re-Add
                return(false);
            }
            else
            {
                KeyBinds.Add(kBind);
            }
            return(UpdateKeyBindGroups(kBind, kindOfChange));
        }