/// <summary> /// Registers a binary responder to be called when a given controller button is /// pressed and the controller subsystem is active. /// </summary> /// <param name="button"></param> /// The button to respond to. /// <param name="entry"> /// The binary responder to bind to the given button. /// </param> public static void SetButtonResponder(GamePadButtons button, BinaryResponder entry) { ButtonMap[button] = entry; if (entry == null) ButtonMap.Remove(button); }
/// <summary> /// Registers a binary responder to be called when a given keyboard key is /// pressed and the keyboard subsystem is active. /// </summary> /// <param name="key"></param> /// The key to respond to. /// <param name="entry"> /// The binary responder to bind to the given key. /// </param> public static void SetKeyResponder(Keys key, BinaryResponder entry) { KeyMap[key] = entry; if (entry == null) KeyMap.Remove(key); }