Now the buttons actually do something - also added a build_type

This commit is contained in:
2011-07-03 10:12:47 -04:00
parent d04cde49c8
commit 793d6bd9a2
4 changed files with 67 additions and 15 deletions

10
game.h
View File

@ -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;