Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Public Member Functions | Private Attributes
Fling::Key Class Reference

#include <Key.h>

Public Member Functions

 Key (const std::string &t_Name, UINT32 t_KeyCode)
 
 ~Key ()=default
 
void SetState (KeyState t_NewState)
 Set the state of this key. More...
 
KeyState GetState () const
 
UINT32 GetCode () const
 
const std::string & GetName () const
 
bool IsPressed () const
 
bool IsUp () const
 

Private Attributes

std::string m_Name
 Name of this key binding. More...
 
KeyState m_State
 The current state of this key. More...
 
UINT32 m_KeyCode
 The key code that is mapped to this key to the current platform. More...
 

Constructor & Destructor Documentation

◆ Key()

Fling::Key::Key ( const std::string &  t_Name,
UINT32  t_KeyCode 
)
inlineexplicit

◆ ~Key()

Fling::Key::~Key ( )
default

Member Function Documentation

◆ GetCode()

UINT32 Fling::Key::GetCode ( ) const
inline

◆ GetName()

const std::string& Fling::Key::GetName ( ) const
inline

◆ GetState()

KeyState Fling::Key::GetState ( ) const
inline

◆ IsPressed()

bool Fling::Key::IsPressed ( ) const
inline

◆ IsUp()

bool Fling::Key::IsUp ( ) const
inline

◆ SetState()

void Fling::Key::SetState ( KeyState  t_NewState)
inline

Set the state of this key.

Field Documentation

◆ m_KeyCode

UINT32 Fling::Key::m_KeyCode
private

The key code that is mapped to this key to the current platform.

◆ m_Name

std::string Fling::Key::m_Name
private

Name of this key binding.

◆ m_State

KeyState Fling::Key::m_State
private

The current state of this key.

Updated when input is polled


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