galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::input Namespace Reference

Functions

void set_clipboard (const std::string &contents) noexcept
 Set clipboard contents.
 
std::string get_clipboard () noexcept
 Get clipboard contents.
 
bool is_key_mod_down (const KeyMods modifier) noexcept
 See if a key mod is being held down.
 
bool is_key_down (const Keys key) noexcept
 See if a key is being held down.
 
bool is_mouse_down (const MouseButton btn) noexcept
 Check if a mouse button was pressed.
 
glm::vec2 get_cursor_pos () noexcept
 Get current cursor position.
 

Function Documentation

◆ set_clipboard()

void galaxy::input::set_clipboard ( const std::string & contents)
noexcept

Set clipboard contents.

Parameters
contentsUTF-8 string.

Definition at line 16 of file Clipboard.cpp.

+ Here is the caller graph for this function:

◆ get_clipboard()

std::string galaxy::input::get_clipboard ( )
nodiscardnoexcept

Get clipboard contents.

Returns
UTF-8 string.

Definition at line 21 of file Clipboard.cpp.

+ Here is the caller graph for this function:

◆ is_key_mod_down()

bool galaxy::input::is_key_mod_down ( const KeyMods modifier)
nodiscardnoexcept

See if a key mod is being held down.

Parameters
modifierKeymod to check.
Returns
True if keymod is currently down.

Definition at line 16 of file Input.cpp.

+ Here is the caller graph for this function:

◆ is_key_down()

bool galaxy::input::is_key_down ( const Keys key)
nodiscardnoexcept

See if a key is being held down.

Parameters
keyKey to check.
Returns
True if key is currently down.

Definition at line 22 of file Input.cpp.

+ Here is the caller graph for this function:

◆ is_mouse_down()

bool galaxy::input::is_mouse_down ( const MouseButton btn)
nodiscardnoexcept

Check if a mouse button was pressed.

Parameters
btnMouse button keycode.
Returns
True if button was pressed.

Definition at line 28 of file Input.cpp.

+ Here is the caller graph for this function:

◆ get_cursor_pos()

glm::vec2 galaxy::input::get_cursor_pos ( )
nodiscardnoexcept

Get current cursor position.

Returns
Returns position as a vec2.

Definition at line 34 of file Input.cpp.

+ Here is the caller graph for this function: