Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
Public Member Functions | Friends | List of all members
Engine::InputManager Class Reference

This object is a simple wrapper class regarding gainput. It also sends information to ImGUI to keep track of pressed buttons. NOTE: only the Engine class is allowed to create this object. More...

#include <InputManager.hpp>

Public Member Functions

gainput::InputManager & GetInputManager ()
 This method allows you to get the input manager from gainput. More...
 
eastl::vector< gainput::DeviceButtonId > GetAllKeysDown (gainput::DeviceId deviceId)
 This method allows you to get all current keys down. NOTE: This only works for keboards. More...
 
const gainput::DeviceId & GetMouseId () const
 This method will return the device Id of the linked mouse. More...
 
const gainput::DeviceId & GetKeyboardId () const
 This method will return the device Id of the linked keyboard. More...
 
const gainput::DeviceId & GetGamepadId () const
 This method will return the device Id of the linked gamepad. More...
 
InputDefaults GetInputDefaults () const
 This method allows you to retrieve some predefined input defaults. More...
 
 ~InputManager () noexcept=default
 

Friends

class Engine
 
void Window::OnWindowResized (GLFWwindow *window, int width, int height)
 

Detailed Description

This object is a simple wrapper class regarding gainput. It also sends information to ImGUI to keep track of pressed buttons. NOTE: only the Engine class is allowed to create this object.

Definition at line 19 of file InputManager.hpp.

Constructor & Destructor Documentation

Engine::InputManager::~InputManager ( )
defaultnoexcept

Member Function Documentation

eastl::vector< gainput::DeviceButtonId > Engine::InputManager::GetAllKeysDown ( gainput::DeviceId  deviceId)

This method allows you to get all current keys down. NOTE: This only works for keboards.

Parameters
deviceIdThe device you want to get the keys for.
Returns
Returns a vector of all current pressed keyboard buttons.

Definition at line 122 of file InputManager.cpp.

const gainput::DeviceId & Engine::InputManager::GetGamepadId ( ) const

This method will return the device Id of the linked gamepad.

Returns
Returns the device Id of the linked gamepad as a const reference

Definition at line 145 of file InputManager.cpp.

InputDefaults Engine::InputManager::GetInputDefaults ( ) const

This method allows you to retrieve some predefined input defaults.

Returns

Definition at line 150 of file InputManager.cpp.

gainput::InputManager & Engine::InputManager::GetInputManager ( )

This method allows you to get the input manager from gainput.

Returns
Returns the input manager from gainput as a reference.

Definition at line 117 of file InputManager.cpp.

const gainput::DeviceId & Engine::InputManager::GetKeyboardId ( ) const

This method will return the device Id of the linked keyboard.

Returns
Returns the device Id of the linked keyboard as a const reference

Definition at line 140 of file InputManager.cpp.

const gainput::DeviceId & Engine::InputManager::GetMouseId ( ) const

This method will return the device Id of the linked mouse.

Returns
Returns the device Id of the linked mouse as a const reference

Definition at line 135 of file InputManager.cpp.

Friends And Related Function Documentation

friend class Engine
friend

Definition at line 66 of file InputManager.hpp.

void Window::OnWindowResized ( GLFWwindow *  window,
int  width,
int  height 
)
friend

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