Ketchup Engine
Loading...
Searching...
No Matches
InputKey Class Reference

#include <InputKey.h>

Collaboration diagram for InputKey:
Collaboration graph

Classes

union  KeyData
 

Public Types

enum class  InputType { MOUSE , KEYBOARD }
 

Public Member Functions

 InputKey (AZUL_KEY key)
 
 InputKey (AZUL_MOUSE mbutton)
 
 InputKey (const InputKey &)
 
 InputKey ()=delete
 
InputKeyoperator= (const InputKey &)=delete
 
 ~InputKey ()
 
bool IsPressed ()
 Query if the input corresponding to the InputKey is currently pressed.
 
InputType GetInputType () const
 Returns whether the InputKey corresponds to an AZUL_KEY or AZUL_MOUSE.
 
AZUL_KEY GetKBVal () const
 Gets AZUL_KEY value of the InputKey.
 
AZUL_MOUSE GetMouseVal () const
 Gets AZUL_MOUSE value of the InputKey.
 

Private Attributes

InputType m_type
 
KeyData m_key
 

Friends

bool operator== (const InputKey &left, const InputKey &right)
 
bool operator< (const InputKey &left, const InputKey &right)
 

Member Enumeration Documentation

◆ InputType

enum class InputKey::InputType
strong
Enumerator
MOUSE 
KEYBOARD 

Constructor & Destructor Documentation

◆ InputKey() [1/4]

InputKey::InputKey ( AZUL_KEY  key)

◆ InputKey() [2/4]

InputKey::InputKey ( AZUL_MOUSE  mbutton)

◆ InputKey() [3/4]

InputKey::InputKey ( const InputKey other)

◆ InputKey() [4/4]

InputKey::InputKey ( )
delete

◆ ~InputKey()

InputKey::~InputKey ( )
inline

Member Function Documentation

◆ GetInputType()

InputKey::InputType InputKey::GetInputType ( ) const

Returns whether the InputKey corresponds to an AZUL_KEY or AZUL_MOUSE.

Haru, 3/19/2023.

Returns
The input type.

◆ GetKBVal()

AZUL_KEY InputKey::GetKBVal ( ) const

Gets AZUL_KEY value of the InputKey.

Haru, 3/19/2023.

Returns
The AZUL_KEY value.

◆ GetMouseVal()

AZUL_MOUSE InputKey::GetMouseVal ( ) const

Gets AZUL_MOUSE value of the InputKey.

Haru, 3/19/2023.

Returns
The AZUL_MOUSE value.

◆ IsPressed()

bool InputKey::IsPressed ( )

Query if the input corresponding to the InputKey is currently pressed.

Haru, 3/19/2023.

Returns
True if down, false if not.

◆ operator=()

InputKey & InputKey::operator= ( const InputKey )
delete

Friends And Related Function Documentation

◆ operator<

bool operator< ( const InputKey left,
const InputKey right 
)
friend

◆ operator==

bool operator== ( const InputKey left,
const InputKey right 
)
friend

Member Data Documentation

◆ m_key

KeyData InputKey::m_key
private

◆ m_type

InputType InputKey::m_type
private

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