Loading...
Searching...
No Matches
hellfire::InputManager Class Reference

#include <InputManager.h>

Collaboration diagram for hellfire::InputManager:

Public Member Functions

bool is_key_pressed (int keycode) const
 
bool is_key_just_pressed (int keycode) const
 
bool is_mouse_button_pressed (int button) const
 
glm::vec2 get_mouse_position () const
 
void set_cursor_mode (const CursorMode mode)
 
void on_key_down (int key)
 
void on_key_up (int key)
 
void on_mouse_button (int button, bool pressed)
 
void on_mouse_move (float x, float y)
 
void update ()
 

Private Attributes

bool keys_ [512] = {false}
 
bool keys_just_pressed_ [512] = {false}
 
bool keys_just_released_ [512] = {false}
 
glm::vec2 mouse_position_ {0.0f, 0.0f}
 
bool mouse_buttons_ [8] = {false}
 

Detailed Description

Definition at line 13 of file InputManager.h.

Member Function Documentation

◆ get_mouse_position()

glm::vec2 hellfire::InputManager::get_mouse_position ( ) const
inline

Definition at line 26 of file InputManager.h.

◆ is_key_just_pressed()

bool hellfire::InputManager::is_key_just_pressed ( int  keycode) const
inline

Definition at line 24 of file InputManager.h.

◆ is_key_pressed()

bool hellfire::InputManager::is_key_pressed ( int  keycode) const
inline

Definition at line 23 of file InputManager.h.

◆ is_mouse_button_pressed()

bool hellfire::InputManager::is_mouse_button_pressed ( int  button) const
inline

Definition at line 25 of file InputManager.h.

◆ on_key_down()

void hellfire::InputManager::on_key_down ( int  key)
inline

Definition at line 36 of file InputManager.h.

◆ on_key_up()

void hellfire::InputManager::on_key_up ( int  key)
inline

Definition at line 43 of file InputManager.h.

◆ on_mouse_button()

void hellfire::InputManager::on_mouse_button ( int  button,
bool  pressed 
)
inline

Definition at line 50 of file InputManager.h.

◆ on_mouse_move()

void hellfire::InputManager::on_mouse_move ( float  x,
float  y 
)
inline

Definition at line 56 of file InputManager.h.

◆ set_cursor_mode()

void hellfire::InputManager::set_cursor_mode ( const CursorMode  mode)
inline

Definition at line 28 of file InputManager.h.

◆ update()

void hellfire::InputManager::update ( )
inline

Definition at line 60 of file InputManager.h.

Member Data Documentation

◆ keys_

bool hellfire::InputManager::keys_[512] = {false}
private

Definition at line 15 of file InputManager.h.

◆ keys_just_pressed_

bool hellfire::InputManager::keys_just_pressed_[512] = {false}
private

Definition at line 16 of file InputManager.h.

◆ keys_just_released_

bool hellfire::InputManager::keys_just_released_[512] = {false}
private

Definition at line 17 of file InputManager.h.

◆ mouse_buttons_

bool hellfire::InputManager::mouse_buttons_[8] = {false}
private

Definition at line 19 of file InputManager.h.

◆ mouse_position_

glm::vec2 hellfire::InputManager::mouse_position_ {0.0f, 0.0f}
private

Definition at line 18 of file InputManager.h.


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