Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mouse_button_up_event.h
Go to the documentation of this file.
1 #ifndef MOUSE_BUTTON_UP_EVENT_H
2 #define MOUSE_BUTTON_UP_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  int button;
16  public:
17  //= BEGIN SCRIPTABLE
18 
24  MouseButtonUpEvent(const int button) : Event(Events::EventType::MOUSE_BUTTON_UP), button(button) {}
32  static std::shared_ptr<MouseButtonUpEvent> create(const int button) { return std::make_shared<MouseButtonUpEvent>(button); }
38  int getButton() const noexcept { return button; }
39  //= END SCRIPTABLE
40  };
41 }
42 
43 #endif
Class for event.
Definition: event.h:10
MouseButtonUpEvent(const int button)
MouseButtonUpEvent constructor.
Definition: mouse_button_up_event.h:24
EventType
Event type enum that is used when passing events.
Definition: event_type.h:12
Definition: event_type.h:16
static std::shared_ptr< MouseButtonUpEvent > create(const int button)
Factory function.
Definition: mouse_button_up_event.h:32
Class for mouse button up event.
Definition: mouse_button_up_event.h:13
Event(const EventType &type)
Event constructor.
Definition: event.h:21
int getButton() const noexcept
Gets the button.
Definition: mouse_button_up_event.h:38