|
|
@@ -19,7 +19,7 @@ public:
|
|
|
static void init();
|
|
|
static void free();
|
|
|
|
|
|
- static spTest _instance;
|
|
|
+ static spTest instance;
|
|
|
static Resources _resources;
|
|
|
|
|
|
struct toggle
|
|
|
@@ -29,7 +29,6 @@ public:
|
|
|
const void* data;
|
|
|
toggle() {}
|
|
|
toggle(const char* text_, int v_ = 0, const void* data_ = 0): text(text_), value(v_), data(data_) {}
|
|
|
-
|
|
|
};
|
|
|
|
|
|
spButton addButton(string id, string txt);
|
|
|
@@ -37,22 +36,25 @@ public:
|
|
|
void updateText(string id, string txt);
|
|
|
virtual void clicked(string id) {}
|
|
|
virtual void toggleClicked(string id, const toggle* data) {}
|
|
|
- void _clicked(Event* event);
|
|
|
- void _toggleClicked(Event* event);
|
|
|
- void back(Event* event);
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
void notify(string text, int time = 400);
|
|
|
|
|
|
protected:
|
|
|
void notifyDone(Event* ev);
|
|
|
+ void _clicked(Event* event);
|
|
|
+ void _toggleClicked(Event* event);
|
|
|
+ void _back(Event* event);
|
|
|
|
|
|
Color _color;
|
|
|
Color _txtColor;
|
|
|
|
|
|
- float _x;
|
|
|
- float _y;
|
|
|
- spActor _ui;
|
|
|
spActor _content;
|
|
|
+ spActor _ui;
|
|
|
+
|
|
|
+ float _x;
|
|
|
+ float _y;
|
|
|
+
|
|
|
enum {MAX_NOTIFIES = 8};
|
|
|
int _notifies[MAX_NOTIFIES];
|
|
|
};
|