aboutsummaryrefslogtreecommitdiffstats
path: root/include/ui_menu.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/ui_menu.hpp')
-rw-r--r--include/ui_menu.hpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/include/ui_menu.hpp b/include/ui_menu.hpp
index 621676a..f9ce397 100644
--- a/include/ui_menu.hpp
+++ b/include/ui_menu.hpp
@@ -7,7 +7,8 @@
typedef void (*menuFunc)(void);
-struct menuItem {
+class menuItem {
+public:
int member;
union {
struct {
@@ -31,19 +32,28 @@ struct menuItem {
float *var;
} slider;
};
+ ~menuItem(){
+ //button.text = NULL;
+ //slider.text = NULL;
+
+ //delete[] button.text;
+ //delete[] slider.text;
+ //delete slider.var;
+ }
};
class Menu {
public:
std::vector<menuItem> items;
- Menu *child, *parent;
+ Menu *parent, *child;
- ~Menu() {
- // TODO you CANNOT delete null pointers!
- /*child = NULL;
+ ~Menu()
+ {
+ items.clear();
+ //delete child;
+ //delete parent;
+ child = NULL;
parent = NULL;
- delete child;
- delete parent;*/
}
void gotoChild(void);