Overload  1.1
Game engine with editor
Public Member Functions | List of all members
OvWindowing::Inputs::InputManager Class Reference

#include <InputManager.h>

Public Member Functions

 InputManager (Window &p_window)
 
 ~InputManager ()
 
EKeyState GetKeyState (EKey p_key) const
 
EMouseButtonState GetMouseButtonState (EMouseButton p_button) const
 
bool IsKeyPressed (EKey p_key) const
 
bool IsKeyReleased (EKey p_key) const
 
bool IsMouseButtonPressed (EMouseButton p_button) const
 
bool IsMouseButtonReleased (EMouseButton p_button) const
 
std::pair< double, double > GetMousePosition () const
 
void ClearEvents ()
 

Detailed Description

Handles inputs (Mouse and keyboard)

Constructor & Destructor Documentation

◆ InputManager()

OvWindowing::Inputs::InputManager::InputManager ( Window p_window)

Create the window

Parameters
p_windowSettings@project: Overload
Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

◆ ~InputManager()

OvWindowing::Inputs::InputManager::~InputManager ( )

Destroy the input manager by removing listeners on the window

Member Function Documentation

◆ ClearEvents()

void OvWindowing::Inputs::InputManager::ClearEvents ( )

Clear any event occured

Note
Should be called at the end of every game tick

◆ GetKeyState()

OvWindowing::Inputs::EKeyState OvWindowing::Inputs::InputManager::GetKeyState ( EKey  p_key) const

Return the current state of the given key

Parameters
p_key

◆ GetMouseButtonState()

OvWindowing::Inputs::EMouseButtonState OvWindowing::Inputs::InputManager::GetMouseButtonState ( EMouseButton  p_button) const

Return the current state of the given mouse button

Parameters
p_button

◆ GetMousePosition()

std::pair< double, double > OvWindowing::Inputs::InputManager::GetMousePosition ( ) const

Return the current mouse position relative to the window

◆ IsKeyPressed()

bool OvWindowing::Inputs::InputManager::IsKeyPressed ( EKey  p_key) const

Return true if the given key has been pressed during the frame

Parameters
p_key

◆ IsKeyReleased()

bool OvWindowing::Inputs::InputManager::IsKeyReleased ( EKey  p_key) const

Return true if the given key has been released during the frame

Parameters
p_key

◆ IsMouseButtonPressed()

bool OvWindowing::Inputs::InputManager::IsMouseButtonPressed ( EMouseButton  p_button) const

Return true if the given mouse button has been pressed during the frame

Parameters
p_button

◆ IsMouseButtonReleased()

bool OvWindowing::Inputs::InputManager::IsMouseButtonReleased ( EMouseButton  p_button) const

Return true if the given mouse button has been released during the frame

Parameters
p_button

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