aboutsummaryrefslogtreecommitdiff
path: root/game/menu.h
blob: 95be68376c538141aa2dbc2b4a4c594b4be5d154 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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