Class InputManager¶
Defined in File input_manager.h
Class Documentation¶
-
class
InputManager
¶ Allows interfacing to game controlling hardware, including mouse, keyboard and XInput controllers. Allows detecting inputs through Event dispatch. Event data for boolean buttons consists of a Vector2 where Vector2.x and Vector2.y carry the old and new values for the input event respectively. Float buttons should be queried directly by invoking InputManager.
Public Functions
-
void
initialize
(unsigned int width, unsigned int height)¶
-
void
setEnabled
(bool enabled)¶
-
void
loadSchemes
(const HashMap<String, InputScheme> &inputSchemes)¶
-
void
addScheme
(const String &name, const InputScheme &inputScheme)¶
-
void
popScheme
()¶
-
void
flushSchemes
()¶
-
void
mapBool
(const Event::Type &action, Device device, DeviceButtonID button)¶ Bind an event to a button on a device.
-
void
mapFloat
(const Event::Type &action, Device device, DeviceButtonID button)¶ Bind an event to a float on a device.
-
void
update
()¶
-
const gainput::InputMap &
getMap
() const¶
-
gainput::InputDeviceMouse *
getMouse
()¶
-
gainput::InputDeviceKeyboard *
getKeyboard
()¶
-
gainput::InputDevicePad *
getPad1
()¶
-
gainput::InputDevicePad *
getPad2
()¶
Public Static Functions
-
static InputManager *
GetSingleton
()¶
-
static void
SetEnabled
(bool enabled)¶
-
static void
MapBool
(const Event::Type &action, Device device, DeviceButtonID button)¶
-
static void
MapFloat
(const Event::Type &action, Device device, DeviceButtonID button)¶
-
void