Now the buttons actually do something - also added a build_type
This commit is contained in:
10
game.h
10
game.h
@ -10,9 +10,11 @@
|
||||
#include "gamedata.h"
|
||||
#include "gamestate.h"
|
||||
#include "menubutton.h"
|
||||
#include <stack>
|
||||
#include <SDL_ttf.h>
|
||||
#include <list>
|
||||
#include <stack>
|
||||
|
||||
using std::list;
|
||||
using std::stack;
|
||||
|
||||
|
||||
@ -39,6 +41,8 @@ class Game : public GameState
|
||||
void draw_stats(Vertex* v);
|
||||
void draw_button(MenuButton* button);
|
||||
|
||||
void handle_button_press(ButtonAction action);
|
||||
|
||||
// data
|
||||
GameData data;
|
||||
// the x,y position of the mouse cursor
|
||||
@ -50,9 +54,7 @@ class Game : public GameState
|
||||
TTF_Font* font;
|
||||
|
||||
// menu buttons
|
||||
MenuButton move_button;
|
||||
MenuButton build_button;
|
||||
MenuButton attack_button;
|
||||
list<MenuButton*> buttons;
|
||||
|
||||
static int NODE_RADIUS;
|
||||
|
||||
|
Reference in New Issue
Block a user