|
Muto 0.0.1
|
Base input class for querying input states. More...
#include <Input.h>
Public Member Functions | |
| Input (const Input &)=delete | |
| Input & | operator= (const Input &)=delete |
Static Public Member Functions | |
| static glm::vec2 | GetMousePosition () |
| Gets the current position of the mouse cursor as a 2D vector. | |
| static float | GetMouseX () |
| Gets the current X position of the mouse cursor. | |
| static float | GetMouseY () |
| Gets the current Y position of the mouse cursor. | |
| static bool | IsKeyPressed (int keycode) |
| Checks if the specified key is currently pressed. | |
| static bool | IsMouseButtonPressed (int button) |
| Checks if the specified mouse button is currently pressed. | |
Protected Member Functions | |
| Input ()=default | |
Base input class for querying input states.
|
protecteddefault |
|
static |
Gets the current position of the mouse cursor as a 2D vector.
References Muto::Application::Get(), Muto::Window::GetNativeWindow(), and Muto::Application::GetWindow().
|
static |
Gets the current X position of the mouse cursor.
|
static |
Gets the current Y position of the mouse cursor.
Checks if the specified key is currently pressed.
| keycode | The keycode of the key to check. |
References Muto::Application::Get(), Muto::Window::GetNativeWindow(), and Muto::Application::GetWindow().
Referenced by Muto::EditorLayer::OnImGuiRender(), Muto::EditorLayer::OnKeyPressed(), Muto::EditorCamera::OnUpdate(), and Muto::OrthographicCameraController::OnUpdate().
Checks if the specified mouse button is currently pressed.
| button | The mouse button to check. |
References Muto::Application::Get(), Muto::Window::GetNativeWindow(), and Muto::Application::GetWindow().
Referenced by Sandbox2D::OnUpdate(), and Muto::EditorCamera::OnUpdate().