-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathControlFrame.h
62 lines (49 loc) · 1.69 KB
/
ControlFrame.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
#ifndef CONTROL_FRAME
#define CONTROL_FRAME
#include <gtkmm/box.h>
#include <gtkmm/button.h>
#include <gtkmm/label.h>
#include <gtkmm/entry.h>
#include <gtkmm/frame.h>
#include "GameController.h"
#include "Game.h"
#include "Observer.h"
class ControlFrame : public Observer {
public:
ControlFrame(GameController *, Game *); // constructor
virtual ~ControlFrame(); // destructor
void notify(); // updates view
protected:
void on_start_click(); // click button clicked
void on_end_click(); // end button clicked
void on_player_type_click(int); // updates on button for Human/AI click
void on_ragequit_click(); // rage quit button cliked
void on_hint_click(); // hint button clicked
private:
GameController *gc_; // controller - handles input events
Game *g_; // facade - used to get certain information from model
bool playerTypeBools[4]; // stores whether player is a AI or human based on button
// GUI elements
Gtk::VBox controlArea;
Gtk::Frame mainControlFrame;
Gtk::VBox mainControl;
Gtk::HBox mainButtons;
Gtk::Button startButton;
Gtk::Button endButton;
Gtk::HBox seedEntryControl;
Gtk::Label seedEntryLabel;
Gtk::Entry seedEntry;
Gtk::Frame playerControlFrame;
Gtk::VBox playerControl;
Gtk::Label currentPlayer;
Gtk::HBox playerControlButtons;
Gtk::Button rageButton;
Gtk::Button hintButton;
Gtk::Frame statsControlFrame;
Gtk::VBox statsControl;
Gtk::HBox playerInfoBoxes[4];
Gtk::Label playerInfoLabels[4];
Gtk::Label playerScores[4];
Gtk::Button playerTypes[4];
};
#endif /* CONTROL_FRAME */