Elevate Engine 1
Loading...
Searching...
No Matches
Elevate::GlfwInput Class Reference

#include <GlfwInput.h>

Inheritance diagram for Elevate::GlfwInput:
Elevate::Input

Protected Member Functions

virtual glm::vec2 GetMousePositionImpl () override
 

Additional Inherited Members

- Static Public Member Functions inherited from Elevate::Input
static bool IsKeyDown (int keycode)
 
static bool IsKeyDown (char key)
 
static bool IsKeyUp (int keycode)
 
static bool IsKeyUp (char key)
 
static bool IsKeyPressed (int keycode)
 
static bool IsKeyPressed (char key)
 
static bool IsMouseButtonDown (int button)
 
static bool IsMouseButtonPressed (int button)
 
static bool IsMouseButtonUp (int button)
 
static glm::vec2 GetMousePosition ()
 
static float GetMouseX ()
 
static float GetMouseY ()
 
- Static Protected Member Functions inherited from Elevate::Input
static void ManageMidStates ()
 
static void ResetAllStates ()
 
static void OnKeyPressedEvent (KeyPressedEvent &e)
 Managed Callbacks // Could be used to simulate inputs to an app by sending events.
 
static void OnKeyReleasedEvent (KeyReleasedEvent &e)
 
static void OnMouseButtonPressedEvent (MouseButtonPressedEvent &e)
 
static void OnMouseButtonReleasedEvent (MouseButtonReleasedEvent &e)
 

Detailed Description

Definition at line 7 of file GlfwInput.h.

Member Function Documentation

◆ GetMousePositionImpl()

glm::vec2 Elevate::GlfwInput::GetMousePositionImpl ( )
overrideprotectedvirtual

Implements Elevate::Input.

Definition at line 6 of file GlfwInput.cpp.

7{
8 auto window = static_cast<GLFWwindow*>(Application::Get().GetWindow().GetNativeWindow());
9 double xpos, ypos;
10 glfwGetCursorPos(window, &xpos, &ypos);
11
12 return { (float)xpos, (float)ypos };
13}
static Application & Get()
Definition Application.h:62
virtual void * GetNativeWindow() const =0

The documentation for this class was generated from the following files: