Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
quit_button.h
Go to the documentation of this file.
1 #ifndef QUIT_BUTTON_H
2 #define QUIT_BUTTON_H
3 
4 #include "graphics/ui/button.h"
5 //= SCRIPTABLE
6 //= SCRIPTABLE BASES Button
7 
8 namespace Graphics {
9  namespace UI {
13  class QuitButton : public Button {
14  public:
15  //= BEGIN SCRIPTABLE
16 
24  QuitButton(std::shared_ptr<WrappableText> text, VertexData vertex_data, std::shared_ptr<Skin> skin, const unsigned int layer);
41  static std::shared_ptr<QuitButton> create(std::shared_ptr<Skin> skin, std::shared_ptr<WrappableText> text, glm::vec4 color, glm::vec4 text_color, float screen_width, float screen_height, float x_pos, float y_pos, float width, float height, const unsigned int layer);
42 
43  virtual void onLeftClick() override;
44  virtual std::string className() const noexcept override;
45  //= END SCRIPTABLE
46  };
47  }
48 }
49 
50 #endif
Class for UI button.
Definition: button.h:13
virtual void onLeftClick() override
Called when element is left clicked.
Definition: quit_button.cpp:33
Class for UI quit button.
Definition: quit_button.h:13
Class for vertex data.
Definition: vertex_data.h:17
QuitButton(std::shared_ptr< WrappableText > text, VertexData vertex_data, std::shared_ptr< Skin > skin, const unsigned int layer)
Quit Button constructor.
Definition: quit_button.cpp:8
static std::shared_ptr< QuitButton > create(std::shared_ptr< Skin > skin, std::shared_ptr< WrappableText > text, glm::vec4 color, glm::vec4 text_color, float screen_width, float screen_height, float x_pos, float y_pos, float width, float height, const unsigned int layer)
Quit Button factory function.
Definition: quit_button.cpp:12
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: quit_button.cpp:37