-
Notifications
You must be signed in to change notification settings - Fork 6
/
UserInterface.h
66 lines (56 loc) · 1.54 KB
/
UserInterface.h
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#pragma once
#include "common.h"
#include <Agui/Agui.hpp>
#include <Agui/Backends/Allegro5/Allegro5.hpp>
#include <Agui/FlowLayout.hpp>
#include <Agui/Widgets/Button/Button.hpp>
#include <Agui/Widgets/DropDown/DropDown.hpp>
class MapSection;
class ConnectActionListener : public agui::ActionListener
{
public:
virtual void actionPerformed(const agui::ActionEvent &evt);
};
class LoadActionListener : public agui::ActionListener
{
public:
virtual void actionPerformed(const agui::ActionEvent &evt);
};
class TilesetActionListener : public agui::ActionListener
{
public:
MapSection * mapsection;
virtual void actionPerformed(const agui::ActionEvent &evt);
};
class FollowActionListener : public agui::ActionListener
{
public:
MapSection * mapsection;
virtual void actionPerformed(const agui::ActionEvent &evt);
};
class MainScreen {
private:
bool last_connection_status;
bool last_follow;
agui::Button connect_button;
agui::Button load_button;
agui::Button follow_button;
agui::DropDown tileset_selector;
agui::Gui* mGui;
agui::FlowLayout flow;
public:
ConnectActionListener connect_action;
LoadActionListener load_action;
TilesetActionListener tile_set_swap_action;
FollowActionListener follow_action;
MainScreen(agui::Gui *guiInstance);
void UpdateText();
void UpdateTilesetList(MapSection * mapsection);
};
extern MainScreen * main_screen;
extern agui::Allegro5Input* inputHandler;
extern agui::Gui *gui;
void initializeAgui();
void add_widgets();
void cleanup_gui();
void render_gui();