Elevate Engine 1
Loading...
Searching...
No Matches
Elevate::KeyPressedEvent Class Reference

#include <KeyEvent.h>

Inheritance diagram for Elevate::KeyPressedEvent:
Elevate::KeyEvent Elevate::Event

Public Member Functions

 KeyPressedEvent (int keycode, int repeatCount)
 
int GetRepeatCount () const
 
std::string ToString () const override
 
- Public Member Functions inherited from Elevate::KeyEvent
int GetKeyCode () const
 
- Public Member Functions inherited from Elevate::Event
virtual EventType GetEventType () const =0
 
virtual const char * GetName () const =0
 
virtual int GetCategoryFlags () const =0
 
bool IsInCategory (EventCategory category)
 

Additional Inherited Members

- Public Attributes inherited from Elevate::Event
bool Handled = false
 
- Protected Member Functions inherited from Elevate::KeyEvent
 KeyEvent (int keycode)
 
- Protected Attributes inherited from Elevate::KeyEvent
int m_KeyCode
 
- Protected Attributes inherited from Elevate::Event
bool m_Handled = false
 

Detailed Description

Definition at line 20 of file KeyEvent.h.

Constructor & Destructor Documentation

◆ KeyPressedEvent()

Elevate::KeyPressedEvent::KeyPressedEvent ( int  keycode,
int  repeatCount 
)
inline

Definition at line 23 of file KeyEvent.h.

24 : KeyEvent(keycode), m_RepeatCount(repeatCount) {}
KeyEvent(int keycode)
Definition KeyEvent.h:14

Member Function Documentation

◆ GetRepeatCount()

int Elevate::KeyPressedEvent::GetRepeatCount ( ) const
inline

Definition at line 26 of file KeyEvent.h.

26{ return m_RepeatCount; }

◆ ToString()

std::string Elevate::KeyPressedEvent::ToString ( ) const
inlineoverridevirtual

Reimplemented from Elevate::Event.

Definition at line 28 of file KeyEvent.h.

29 {
30 std::stringstream ss;
31 ss << "KeyPressedEvent: " << m_KeyCode << " (" << m_RepeatCount << " repeats)";
32 return ss.str();
33 }

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