1 #ifndef PGE_MENUBOXBASE_H
2 #define PGE_MENUBOXBASE_H
23 #include "pge_boxbase.h"
24 #include "../scenes/scene.h"
26 #include <graphics/gl_renderer.h>
27 #include <graphics/gl_color.h>
28 #include <common_features/rect.h>
29 #include <common_features/point.h>
30 #include <common_features/pointf.h>
31 #include <common_features/size.h>
32 #include <common_features/sizef.h>
36 #include <QStringList>
39 #include "pge_msgbox.h"
46 PGE_MenuBoxBase(
Scene * _parentScene=NULL, PGE_Menu::menuAlignment alignment=PGE_Menu::menuAlignment::VERTICLE,
int gapSpace=0, QString _title=
"Menu is works!",
47 msgType _type=msg_info,
PGE_Point boxCenterPos=
PGE_Point(-1,-1),
float _padding=-1, QString texture=
"");
50 void construct(QString _title=
"Menu is works!",
51 msgType _type=msg_info,
PGE_Point pos=
PGE_Point(-1,-1),
float _padding=-1, QString texture=
"");
55 void setParentScene(
Scene * _parentScene);
56 void setType(msgType _type);
57 void setTitleFont(QString fontName);
58 void setTitleFontColor(
GlColor color);
59 void setTitleText(QString text);
60 void setPadding(
int _padding);
63 void addMenuItem(QString &menuitem);
64 void addMenuItems(QStringList &menuitems);
66 void setPos(
float x,
float y);
67 void setMaxMenuItems(
int items);
68 void setBoxSize(
float _Width,
float _Height,
float _padding);
69 void update(
float ticks);
74 void setRejectSnd(
long sndRole);
79 void processKeyEvent(SDL_Keycode &key);
81 void processLoader(
float ticks);
82 void processBox(
float);
83 void processUnLoader(
float ticks);
85 static void info(QString msg);
87 static void warn(QString msg);
89 static void error(QString msg);
91 static void fatal(QString msg);
119 void initControllers();
120 void updateControllers();
122 virtual void onUpButton() {}
123 virtual void onDownButton() {}
124 virtual void onLeftButton() {}
125 virtual void onRightButton() {}
126 virtual void onJumpButton() {}
127 virtual void onAltJumpButton() {}
128 virtual void onRunButton() {}
129 virtual void onAltRunButton() {}
130 virtual void onStartButton() {}
131 virtual void onDropButton() {}
134 #endif // PGE_MENUBOXBASE_H
The PGE_BoxBase class.
Definition: pge_boxbase.h:16
The Controller class provides proxy interface between controllable objects array and physical control...
Definition: controller.h:32