KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::KeyEvent Class Reference

Base class for keyboard event. More...

#include <KeyEvent.h>

Inheritance diagram for Karma::KeyEvent:
Karma::Event Karma::KeyPressedEvent Karma::KeyReleasedEvent Karma::KeyTypedEvent

Public Member Functions

int GetKeyCode () const
 Getter for key code of the keyboard event.
Public Member Functions inherited from Karma::Event
virtual EventType GetEventType () const =0
 Getter for event name (type).
virtual const char * GetName () const =0
 Getter for event type.
virtual int GetCategoryFlags () const =0
 Getter for category flags (enum EventCategory).
virtual std::string ToString () const
 String representation of the event.
bool IsInCategory (EventCategory category)
 Routine to see if the category of the Event is (or a part of) given category.
bool IsHandled () const
 Getter for the m_Handled.
EventGetObjPointer ()
 Getter for the pointer to the object.

Protected Member Functions

 KeyEvent (int keycode)
 A constructor.

Protected Attributes

int m_KeyCode
Protected Attributes inherited from Karma::Event
bool m_Handled = false

Detailed Description

Base class for keyboard event.

Constructor & Destructor Documentation

◆ KeyEvent()

Karma::KeyEvent::KeyEvent ( int keycode)
inlineprotected

A constructor.

Parameters
keycodeGLFW defined key code for the event
See also
https://www.glfw.org/docs/3.3/group__keys.html
Since
Karma 1.0.0

Member Function Documentation

◆ GetKeyCode()

int Karma::KeyEvent::GetKeyCode ( ) const
inline

Getter for key code of the keyboard event.

Since
Karma 1.0.0

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