aboutsummaryrefslogtreecommitdiff
path: root/game/menu.h
diff options
context:
space:
mode:
authorjacopograndi <jak.sk8@hotmail.it>2021-08-30 14:48:06 +0200
committerjacopograndi <jak.sk8@hotmail.it>2021-08-30 14:48:06 +0200
commitfb5a98b72ab79949d1da7f75a3d6150c2906ef40 (patch)
tree9097b4e1f31e530874df9ab85be03f763fc4ef1b /game/menu.h
parentace5c3f3093c50ff7fa6f8b281a377e3788abbd5 (diff)
gui: tech representation, menu, tile & unit info, attack info
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