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
Input.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_INPUT_INPUT_HPP_
9#define GALAXY_INPUT_INPUT_HPP_
10
11#include <glm/vec2.hpp>
12
13#include "galaxy/input/Keys.hpp"
15
16namespace galaxy
17{
18 namespace input
19 {
27 [[nodiscard]]
28 bool is_key_mod_down(const KeyMods modifier) noexcept;
29
37 [[nodiscard]]
38 bool is_key_down(const Keys key) noexcept;
39
47 [[nodiscard]]
48 bool is_mouse_down(const MouseButton btn) noexcept;
49
55 [[nodiscard]]
56 glm::vec2 get_cursor_pos() noexcept;
57 } // namespace input
58} // namespace galaxy
59
60#endif
glm::vec2 get_cursor_pos() noexcept
Get current cursor position.
Definition Input.cpp:34
bool is_key_mod_down(const KeyMods modifier) noexcept
See if a key mod is being held down.
Definition Input.cpp:16
bool is_key_down(const Keys key) noexcept
See if a key is being held down.
Definition Input.cpp:22
bool is_mouse_down(const MouseButton btn) noexcept
Check if a mouse button was pressed.
Definition Input.cpp:28
Animated.cpp galaxy.
Definition Animated.cpp:16
Keys
Enum class representing keys.
Definition Keys.hpp:19
KeyMods
Enum class for key modifiers.
Definition Keys.hpp:282
MouseButton
Enum class representing mouse buttons.