![]() |
Raven Engine v0.1
|
Event triggered when a key is pressed. More...
#include <KeyEvent.h>
Public Member Functions | |
| KeyPressedEvent (int keycode, bool isRepeat) | |
| Constructs a KeyPressedEvent. | |
| bool | IsRepeat () const |
| Indicates if the key press is a repeated event. | |
| std::string | ToString () const override |
| Returns a string representation of the event. | |
| Public Member Functions inherited from Raven::KeyEvent | |
| int | GetKeyCode () const |
| Returns the key code associated with this event. | |
| Public Member Functions inherited from Raven::Event | |
| virtual | ~Event ()=default |
| virtual EventType | GetEventType () const =0 |
| Returns the runtime event type. | |
| virtual const char * | GetName () const =0 |
| Returns the name of the event. | |
| virtual EventCategory | GetCategoryFlags () const =0 |
| Returns the category flags of the event. | |
| bool | IsInCategory (EventCategory category) const |
| Checks if the event belongs to the specified category. | |
Additional Inherited Members | |
| Public Attributes inherited from Raven::Event | |
| bool | Handled = false |
| Indicates whether the event has been handled. | |
| Protected Member Functions inherited from Raven::KeyEvent | |
| KeyEvent (int keycode) | |
| Protected constructor for KeyEvent. | |
| Protected Attributes inherited from Raven::KeyEvent | |
| int | m_KeyCode |
Event triggered when a key is pressed.
Includes an additional flag to indicate if the event is a repeat (key held down).
|
inline |
Constructs a KeyPressedEvent.
| keycode | The key code of the pressed key. |
| isRepeat | True if the key press is a repeat (from key hold). |
|
inlinenodiscard |
Indicates if the key press is a repeated event.
|
inlinenodiscardoverridevirtual |
Returns a string representation of the event.
Reimplemented from Raven::Event.