summaryrefslogtreecommitdiff
path: root/src/gui/game/GameController.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-05-15 03:50:26 (GMT)
committer jacob1 <jfu614@gmail.com>2013-05-15 03:50:26 (GMT)
commit94d21a1679749df49342903545192254a27f8ffc (patch)
tree81d4f9771b4821ad29b0dee0240febcb4e08280e /src/gui/game/GameController.cpp
parentab3675d6eea1ce6eeeac713ed44f5cb591ff820f (diff)
downloadpowder-94d21a1679749df49342903545192254a27f8ffc.zip
powder-94d21a1679749df49342903545192254a27f8ffc.tar.gz
when called with no arguments, some tpt. functions will act as get functions (unfinished)
Also, redo some menu stuff to use int's instead of Menu *s, and fix bug with toggleable buttons being toggled without triggering their actions
Diffstat (limited to 'src/gui/game/GameController.cpp')
-rw-r--r--src/gui/game/GameController.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp
index 09e1a1c..ad48f66 100644
--- a/src/gui/game/GameController.cpp
+++ b/src/gui/game/GameController.cpp
@@ -924,6 +924,11 @@ void GameController::SetHudEnable(bool hudState)
gameView->SetHudEnable(hudState);
}
+bool GameController::GetHudEnable()
+{
+ return gameView->GetHudEnable();
+}
+
void GameController::SetActiveColourPreset(int preset)
{
gameModel->SetActiveColourPreset(preset);
@@ -935,18 +940,15 @@ void GameController::SetColour(ui::Colour colour)
gameModel->SetPresetColour(colour);
}
-void GameController::SetActiveMenu(Menu * menu)
+void GameController::SetActiveMenu(int menuID)
{
- gameModel->SetActiveMenu(menu);
+ gameModel->SetActiveMenu(menuID);
vector<Menu*> menuList = gameModel->GetMenuList();
bool set = false;
- for(int i = 0; i < menuList.size(); i++)
+ if(menuID == SC_DECO)
{
- if(menuList[i]==menu && i == SC_DECO)
- {
- gameModel->SetColourSelectorVisibility(true);
- set = true;
- }
+ gameModel->SetColourSelectorVisibility(true);
+ set = true;
}
if(!set)
gameModel->SetColourSelectorVisibility(false);