Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::Input Class Reference

Provides static methods to query keyboard and mouse state. More...

#include <Input.h>

Static Public Member Functions

static bool IsKeyPressed (KeyCode key)
 Checks if a specific key is currently pressed.
static bool IsMouseButtonPressed (MouseCode button)
 Checks if a specific mouse button is currently pressed.
static std::pair< float, float > GetMousePosition ()
 Gets the current mouse position.
static float GetMouseX ()
 Gets the current X position of the mouse.
static float GetMouseY ()
 Gets the current Y position of the mouse.

Detailed Description

Provides static methods to query keyboard and mouse state.

This class serves as the abstraction layer over the platform-specific input backend. Direct polling only; does not handle input buffering or events.

Member Function Documentation

◆ GetMousePosition()

std::pair< float, float > Raven::Input::GetMousePosition ( )
static

Gets the current mouse position.

Returns
A pair containing the X and Y coordinates of the mouse.

◆ GetMouseX()

float Raven::Input::GetMouseX ( )
static

Gets the current X position of the mouse.

Returns
The X coordinate.

◆ GetMouseY()

float Raven::Input::GetMouseY ( )
static

Gets the current Y position of the mouse.

Returns
The Y coordinate.

◆ IsKeyPressed()

bool Raven::Input::IsKeyPressed ( KeyCode key)
static

Checks if a specific key is currently pressed.

Parameters
keyThe keycode to query.
Returns
True if the key is pressed, false otherwise.

◆ IsMouseButtonPressed()

bool Raven::Input::IsMouseButtonPressed ( MouseCode button)
static

Checks if a specific mouse button is currently pressed.

Parameters
buttonThe mouse button code to query.
Returns
True if the button is pressed, false otherwise.

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