Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
character_typed_event.h
Go to the documentation of this file.
1 #ifndef CHARACTER_TYPED_EVENT_H
2 #define CHARACTER_TYPED_EVENT_H
3 #include <glm/glm.hpp>
4 #include "events/event.h"
5 #include "events/event_type.h"
6 //= SCRIPTABLE
7 //= SCRIPTABLE BASES Event
8 
9 namespace Input {
14  private:
15  unsigned char character;
16  public:
17  //= BEGIN SCRIPTABLE
18 
24  CharacterTypedEvent(const unsigned char character) : Event(Events::EventType::CHARACTER_TYPED), character(character) {}
32  static std::shared_ptr<CharacterTypedEvent> create(const unsigned char character) { return std::make_shared<CharacterTypedEvent>(character); }
38  unsigned char getCharacter() const noexcept { return character; }
39  //= END SCRIPTABLE
40  };
41 }
42 
43 #endif
unsigned char getCharacter() const noexcept
Gets the character.
Definition: character_typed_event.h:38
Class for event.
Definition: event.h:10
CharacterTypedEvent(const unsigned char character)
CharacterTypedEvent constructor.
Definition: character_typed_event.h:24
static std::shared_ptr< CharacterTypedEvent > create(const unsigned char character)
Factory function.
Definition: character_typed_event.h:32
Definition: event_type.h:22
EventType
Event type enum that is used when passing events.
Definition: event_type.h:12
Event(const EventType &type)
Event constructor.
Definition: event.h:21
Class for character typed event.
Definition: character_typed_event.h:13