cmdfx 0.2.1
Lightweight game engine for your terminal
Loading...
Searching...
No Matches
CmdFX::Device Namespace Reference

C++ wrapper for the CmdFX Device API. More...

Functions

std::vector< bool > getKeyboardKeysPressed ()
 Gets a vector of booleans representing the state of the keyboard keys.
 
char fromKeyCode (int keyCode)
 
std::vector< bool > getMouseButtonsPressed ()
 Gets a vector of mouse buttons that are currently pressed.
 

Detailed Description

C++ wrapper for the CmdFX Device API.

Function Documentation

◆ getKeyboardKeysPressed()

std::vector< bool > CmdFX::Device::getKeyboardKeysPressed ( )

Gets a vector of booleans representing the state of the keyboard keys.

This function retrieves the state of the keyboard keys and returns a vector of booleans indicating whether each key is pressed or not. The vector will contain 256 elements, corresponding to the computer's keyboard layout.

Returns
A vector of booleans representing the state of each keyboard key.

◆ getMouseButtonsPressed()

std::vector< bool > CmdFX::Device::getMouseButtonsPressed ( )

Gets a vector of mouse buttons that are currently pressed.

This function retrieves the state of the mouse buttons and returns a vector of booleans indicating whether each button is pressed or not. The vector will contain three elements, corresponding to the left, middle, and right mouse buttons.

Returns
A vector of booleans representing the state of each mouse button.