public void AddButton(KeyboardButton button) { _buttons.Add(button); if (!NameButtonDict.ContainsKey(button.Name)) NameButtonDict[button.Name] = new List<KeyboardButton>(); NameButtonDict[button.Name].Add(button); }
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(); }
public void SetButtons(KeyboardButton[] buttons) { _buttons = new List<KeyboardButton>(buttons); BuildNameButtonDict(); }
public void RemoveButton(KeyboardButton button) { _buttons.Remove(button); if (NameButtonDict.ContainsKey(button.Name)) NameButtonDict[button.Name].Remove(button); }
public void AddButtons(KeyboardButton[] buttons) { foreach (KeyboardButton button in buttons) { AddButton(button); } }
public void RemoveButtons(KeyboardButton[] buttons) { foreach (KeyboardButton button in buttons) { RemoveButton(button); } }