Input¶
static class · namespace Hazel
Methods¶
GetConnectedControllerIDs()¶
static
GetControllerAxis(int, int)¶
static
GetControllerDeadzone(int, int)¶
static
Getter for the specified controller's axis' deadzone, default value is 0.0f
GetControllerHat(int, int)¶
static
GetControllerName(int)¶
static
GetCursorMode()¶
static
GetMousePosition()¶
static
IsControllerButtonDown(int, GamepadButton)¶
static
Returns true every frame that the button is down. Equivalent to doing Input.IsMouseButtonPressed(key) || Input.IsMouseButtonHeld(key)
IsControllerButtonDown(int, int)¶
static
IsControllerButtonHeld(int, GamepadButton)¶
static
Returns true every frame after the button was initially pressed (returns false when Input.IsMouseButtonPressed returns true)
IsControllerButtonHeld(int, int)¶
static
IsControllerButtonPressed(int, GamepadButton)¶
static
Returns true during the frame that the button was released
IsControllerButtonPressed(int, int)¶
static
IsControllerButtonReleased(int, GamepadButton)¶
static
Returns true during the frame that the button was released
IsControllerButtonReleased(int, int)¶
static
IsControllerPresent(int)¶
static
IsKeyDown(KeyCode)¶
static
Returns true every frame that the key is down. Equivalent to doing Input.IsKeyPressed(key) || Input.IsKeyHeld(key)
IsKeyHeld(KeyCode)¶
static
Returns true every frame after the key was initially pressed (returns false when Input.IsKeyPressed returns true)
IsKeyPressed(KeyCode)¶
static
Returns true the first frame that the key represented by the given KeyCode is pressed down
IsKeyReleased(KeyCode)¶
static
Returns true during the frame that the key was released
IsKeyToggledOn(KeyCode)¶
static
Returns true if one of the toggleable keys (CapsLock, NumLock, ScrollLock) is toggled on. If keycode is not one of these keys, this will return false.
Parameters
| Name | Description |
|---|---|
keycode |
IsMouseButtonDown(MouseButton)¶
static
Returns true every frame that the button is down. Equivalent to doing Input.IsMouseButtonPressed(key) || Input.IsMouseButtonHeld(key)
IsMouseButtonHeld(MouseButton)¶
static
Returns true every frame after the button was initially pressed (returns false when Input.IsMouseButtonPressed returns true)
IsMouseButtonPressed(MouseButton)¶
static
Returns true the first frame that the button represented by the given MouseButton is pressed down
IsMouseButtonReleased(MouseButton)¶
static
Returns true during the frame that the button was released
SetControllerDeadzone(int, int, float)¶
static
Setter for the specified controller's axis' deadzone, default value is 0.0f
SetCursorMode(CursorMode)¶
static
Source: Hazel/Core/Input.cs