aboutsummaryrefslogtreecommitdiff
path: root/game/menu.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/menu.h')
-rw-r--r--game/menu.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/game/menu.h b/game/menu.h
index bf181b5..462d893 100644
--- a/game/menu.h
+++ b/game/menu.h
@@ -5,6 +5,7 @@
#include <string>
#include "../umath/vec2.h"
+#include "tech.h"
class Option {
public:
@@ -22,10 +23,11 @@ class Menu {
bool active { false };
std::vector<Option> options;
vec2 pos, size;
+ int over;
- void open (vec2 res);
void close ();
- int mouse_option (vec2 mouse);
+ virtual void open (vec2 res);
+ virtual int mouse_option (vec2 mouse);
};
class Menu_unit : public Menu {
@@ -55,4 +57,23 @@ class Menu_train : public Menu {
Menu_train () {}
};
+
+class OptionTech {
+ public:
+ OptionTech(std::string name, Tech *tech) : name(name), tech(tech) {}
+
+ std::string name;
+ Tech *tech;
+};
+
+class Menu_tech : public Menu {
+ public:
+ Menu_tech () {}
+ std::vector<OptionTech> tech_options;
+ std::vector<std::vector<OptionTech>> tech_opt_ordered;
+
+ void open (vec2 res) override;
+ int mouse_option (vec2 mouse) override;
+};
+
#endif \ No newline at end of file