summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-03-04 16:26:03 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-03-04 16:26:03 (GMT)
commit644e6770e43e5ed568b0cdc14d63f20869d7fccc (patch)
tree19e0b8b60df245d0972a3d7afb106f6954b931ee /src/game/GameController.cpp
parent3bbaa1a111e3770d2ce9b04f4b0f9688948d3e85 (diff)
downloadpowder-644e6770e43e5ed568b0cdc14d63f20869d7fccc.zip
powder-644e6770e43e5ed568b0cdc14d63f20869d7fccc.tar.gz
Slider and decoration colour changer
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index e6baa5e..1164de5 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -292,9 +292,26 @@ void GameController::SetDecoration()
gameModel->SetDecoration(!gameModel->GetDecoration());
}
+void GameController::SetColour(ui::Colour colour)
+{
+ gameModel->SetColourSelectorColour(colour);
+}
+
void GameController::SetActiveMenu(Menu * menu)
{
gameModel->SetActiveMenu(menu);
+ vector<Menu*> menuList = gameModel->GetMenuList();
+ bool set = false;
+ for(int i = 0; i < menuList.size(); i++)
+ {
+ if(menuList[i]==menu && i == SC_DECO)
+ {
+ gameModel->SetColourSelectorVisibility(true);
+ set = true;
+ }
+ }
+ if(!set)
+ gameModel->SetColourSelectorVisibility(false);
}
void GameController::SetActiveTool(int toolSelection, Tool * tool)