Пример #1
0
        public void AddButton(KeyboardButton button)
        {
            _buttons.Add(button);

            if (!NameButtonDict.ContainsKey(button.Name))
                NameButtonDict[button.Name] = new List<KeyboardButton>();

            NameButtonDict[button.Name].Add(button);
        }
Пример #2
0
        public KeyboardInfo(string name, KeyboardButton[] buttons, KeyboardAxis[] axes, IInputListener[] listeners)
            : base(name, listeners)
        {
            _buttons = new List<KeyboardButton>(buttons);
            _axes = new List<KeyboardAxis>(axes);

            BuildNameButtonDict();
            BuildNameAxisDict();
        }
Пример #3
0
 public void SetButtons(KeyboardButton[] buttons)
 {
     _buttons = new List<KeyboardButton>(buttons);
     BuildNameButtonDict();
 }
Пример #4
0
        public void RemoveButton(KeyboardButton button)
        {
            _buttons.Remove(button);

            if (NameButtonDict.ContainsKey(button.Name))
                NameButtonDict[button.Name].Remove(button);
        }
Пример #5
0
 public void AddButtons(KeyboardButton[] buttons)
 {
     foreach (KeyboardButton button in buttons) {
         AddButton(button);
     }
 }
Пример #6
0
 public void RemoveButtons(KeyboardButton[] buttons)
 {
     foreach (KeyboardButton button in buttons) {
         RemoveButton(button);
     }
 }