QuasarEngine
Cross-platform 3D engine and editor
Toggle main menu visibility
Loading...
Searching...
No Matches
Input.h
Go to the documentation of this file.
1
#pragma once
2
7
8
#include <
quasar/core/KeyCodes.h
>
9
#include <
quasar/core/MouseCodes.h
>
10
11
#include <glm/vec2.hpp>
12
21
namespace
Quasar::Input
22
{
26
bool
IsKeyPressed
(
Key
key);
27
29
bool
IsMouseButtonPressed
(
MouseButton
button);
30
35
glm::vec2
GetMousePosition
();
36
}
KeyCodes.h
Codes of the keyboard keys, independent from GLFW.
MouseCodes.h
Codes of the mouse buttons, independent from GLFW.
Quasar::Input
Functions that read the current state of the keyboard and the mouse, as an alternative to events.
Definition
Input.h:22
Quasar::Input::GetMousePosition
glm::vec2 GetMousePosition()
Returns the position of the cursor, in screen coordinates, from the top-left corner of the drawing ar...
Quasar::Input::IsKeyPressed
bool IsKeyPressed(Key key)
Returns true if the key is held down.
Quasar::Input::IsMouseButtonPressed
bool IsMouseButtonPressed(MouseButton button)
Returns true if the mouse button is held down.
Quasar::Key
Key
Physical key of the keyboard.
Definition
KeyCodes.h:22
Quasar::MouseButton
MouseButton
Button of the mouse.
Definition
MouseCodes.h:17
quasar
core
Input.h
Generated by
1.18.0