From 67cbd43740a3370ecd66f0f8c632a137774f90ff Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Mon, 4 Jul 2011 01:40:02 -0400 Subject: [PATCH] Make end turn button appear in the right place --- game.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/game.cpp b/game.cpp index acdd0c3..5879bbf 100644 --- a/game.cpp +++ b/game.cpp @@ -151,14 +151,17 @@ void Game::render() DrawUtils::draw_line(display, 150, display->h - 100, 150, display->h, 2, 0x000000); - if (data.get_current_vertex() != NULL && - data.get_current_vertex()->player == data.get_turn()) { for (list::iterator cursor = buttons.begin(); cursor != buttons.end(); cursor++) { MenuButton* button = *cursor; + if (!(button->get_action() & BUTTON_END_TURN) && + (data.get_current_vertex() == NULL || + data.get_current_vertex()->player != data.get_turn())) + continue; + if ((button->get_action() & (BUTTON_BUILD_ATTACKER | BUTTON_BUILD_DEFENDER | BUTTON_BUILD_PRODUCER)) &&