StevEngine
StevEngine is a customizable C++ game engine.
Loading...
Searching...
No Matches
StevEngine::InputManager Class Reference

Handles input processing and management. More...

#include <inputs/InputSystem.hpp>

Public Member Functions

void Init ()
 Initialize input system.
 
EventManagerGetEvents ()
 Get input events manager.
 
bool IsKeyPressed (Button key) const
 Check if key is currently pressed.
 
void ForcePressKey (Button key, bool value)
 Force key press state.
 
Utilities::Vector2 GetMousePosition () const
 Get current mouse position.
 
Utilities::Vector2 GetMouseDelta () const
 Get mouse movement since last frame.
 

Public Attributes

CursorMode cursorMode = Free
 Current cursor behavior mode.
 
bool cursorVisible = true
 Whether cursor is visible.
 

Detailed Description

Handles input processing and management.

Processes keyboard, mouse and cursor input events. Maintains input state and provides methods to query input status.

Member Function Documentation

◆ ForcePressKey()

void StevEngine::InputManager::ForcePressKey ( Button key,
bool value )

Force key press state.

Parameters
keyButton keycode to set
valuePressed state to set

Log::Debug(std::format("Changed pressed status of key ({}) to {}", SDL_GetKeyName(key), value), true);

◆ GetEvents()

EventManager * StevEngine::InputManager::GetEvents ( )
inline

Get input events manager.

Returns
Pointer to event manager

◆ GetMouseDelta()

Utilities::Vector2 StevEngine::InputManager::GetMouseDelta ( ) const
inline

Get mouse movement since last frame.

Returns
Vector2 containing mouse movement delta

◆ GetMousePosition()

Utilities::Vector2 StevEngine::InputManager::GetMousePosition ( ) const
inline

Get current mouse position.

Returns
Vector2 containing mouse coordinates

◆ IsKeyPressed()

bool StevEngine::InputManager::IsKeyPressed ( Button key) const

Check if key is currently pressed.

Parameters
keyButton keycode to check
Returns
true if key is pressed, false otherwise

Log::Debug(std::format("Key ({}) has pressed value of {}", SDL_GetKeyName(key), pressed), true);


The documentation for this class was generated from the following files: