class
#include <nCine/Input/IInputManager.h>
IInputManager Interface for parsing and dispatching input events.
Derived classes
- class AndroidInputManager
- Class for parsing and dispatching Android input events.
- class GlfwInputManager
- Slass for parsing and dispatching GLFW input events.
- class Qt5InputManager
- Class for parsing and dispatching Qt5 input events.
- class SdlInputManager
- Class for parsing and dispatching SDL input events.
- class UwpInputManager
- Class for dispatching UWP input events.
Public types
- enum class Cursor { Arrow, Hidden, HiddenLocked }
Public static variables
-
static const std::
int32_t MaxNumJoysticks - static float LeftStickDeadZone constexpr
- static float RightStickDeadZone constexpr
- static float TriggerDeadZone constexpr
- static float AnalogButtonDeadZone constexpr
- static float TriggerButtonDeadZone constexpr
Public static functions
- static auto handler() -> IInputEventHandler*
- Gets the current input event handler for the manager.
- static void setHandler(IInputEventHandler* inputEventHandler)
- Sets the input event handler for the manager.
Constructors, destructors, conversion operators
- IInputManager()
- ~IInputManager() virtual
Public functions
- auto mouseState() const -> const MouseState& pure virtual
- Returns current mouse state.
- auto keyboardState() const -> const KeyboardState& pure virtual
- Returns current keyboard state.
- auto getClipboardText() const -> String virtual
- Returns text from the clipboard if any.
- auto getKeyName(Keys key) const -> StringView virtual
- Returns display name of the specified key.
- auto isJoyPresent(int joyId) const -> bool pure virtual
- Returns true if the specified joystick is connected.
- auto joyName(int joyId) const -> const char* pure virtual
- Returns the name of the specified joystick.
- auto joyGuid(int joyId) const -> const JoystickGuid pure virtual
- Returns the GUID of the specified joystick.
- auto joyNumButtons(int joyId) const -> int pure virtual
- Returns the number of available buttons for the specified joystick.
- auto joyNumHats(int joyId) const -> int pure virtual
- Returns the number of available hats for the specified joystick.
- auto joyNumAxes(int joyId) const -> int pure virtual
- Returns the number of available axes for the specified joystick.
- auto joystickState(int joyId) const -> const JoystickState& pure virtual
- Returns the state of the joystick.
- auto joystickRumble(int joyId, float lowFrequency, float highFrequency, uint32_t durationMs) -> bool pure virtual
- Starts a main rumble effect with specified duration.
- auto joystickRumbleTriggers(int joyId, float left, float right, uint32_t durationMs) -> bool pure virtual
- Starts a rumble effect on triggers with specified duration.
- auto isJoyMapped(int joyId) const -> bool
- Returns
true
if the joystick has a valid mapping configuration. - auto joyMappedState(int joyId) const -> const JoyMappedState&
- Returns the state of the mapped joystick.
- void deadZoneNormalize(Vector2f& joyVector, float deadZoneValue) const
- Modify the joystick axis vector to account for a dead zone.
- void addJoyMappingsFromFile(StringView path)
- Adds joystick mapping configurations from a text file.
- void addJoyMappingsFromString(StringView mappingStrings)
- Adds joystick mapping configurations from a string.
- auto numJoyMappings() const -> unsigned int
- Returns the current number of valid joystick mappings.
- auto hasMappingByGuid(const JoystickGuid& guid) const -> bool
- Returns true if mapping exists for specified joystick by GUID.
- auto hasMappingByName(const char* name) const -> bool
- Returns true if mapping exists for specified joystick by name.
- auto cursor() const -> Cursor
- Returns current mouse cursor mode.
- void setCursor(Cursor cursor) virtual
- Sets the mouse cursor mode.
Protected static variables
- static IInputEventHandler* inputEventHandler_
- static Cursor cursor_
- static JoyMapping joyMapping_
Enum documentation
enum class nCine:: IInputManager:: Cursor
Enumerators | |
---|---|
Arrow |
Mouse cursor behaves normally with default Arrow. |
Hidden |
Mouse cursor is hidden but behaves normally. |
HiddenLocked |
Mouse cursor is hidden and locked to the window. |