diff options
author | jacopograndi <jak.sk8@hotmail.it> | 2021-08-19 18:46:51 +0200 |
---|---|---|
committer | jacopograndi <jak.sk8@hotmail.it> | 2021-08-19 18:46:51 +0200 |
commit | a8bcacc95045102e67f2feabbdddf79535837554 (patch) | |
tree | 5781dd4cb2fe66b67deab84ff4641b7e21b9c174 /game/menu.h |
forgot to make repo until now
Diffstat (limited to 'game/menu.h')
-rw-r--r-- | game/menu.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/game/menu.h b/game/menu.h new file mode 100644 index 0000000..95be683 --- /dev/null +++ b/game/menu.h @@ -0,0 +1,47 @@ +#ifndef MENU_H +#define MENU_H + +#include <vector> +#include <string> + +#include "../umath/vec2.h" + +class Option { + public: + Option(std::string name, int id) : name(name), id(id) {} + + std::string name; + int id; +}; + + +class Menu { + public: + bool active { false }; + std::vector<Option> options; + vec2 pos, size; + + void open (vec2 res); + void close (); + int mouse_option (vec2 mouse); +}; + +class Menu_unit : public Menu { + public: + Menu_unit () {} + + enum Opts { + move, attack, done + }; +}; + +class Menu_day : public Menu { + public: + Menu_day () {} + + enum Opts { + end_day, tech, empire_review, scoring + }; +}; + +#endif
\ No newline at end of file |