summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-02-09 03:24:34 (GMT)
committer jacob1 <jfu614@gmail.com>2013-02-09 03:24:34 (GMT)
commit1359045b14a455c5ee54a7b066e606a3b76368b0 (patch)
treee870d360cd4c70338ee0f217361851f1fe947b74 /src/game/GameController.cpp
parentb8d53b5f7659f6b95f025a900d3b9982400dcc59 (diff)
downloadpowder-1359045b14a455c5ee54a7b066e606a3b76368b0.zip
powder-1359045b14a455c5ee54a7b066e606a3b76368b0.tar.gz
fix tpt.selectedl not updating with sample brush, always put photons[] on top in HUD
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index efe37c4..9e7978b 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -148,9 +148,9 @@ GameController::GameController():
((LuaScriptInterface*)commandInterface)->SetWindow(gameView);
commandInterface->OnBrushChanged(gameModel->GetBrushID(), gameModel->GetBrush()->GetRadius().X, gameModel->GetBrush()->GetRadius().X);
- commandInterface->OnActiveToolChanged(0, gameModel->GetActiveTool(0));
- commandInterface->OnActiveToolChanged(1, gameModel->GetActiveTool(1));
- commandInterface->OnActiveToolChanged(2, gameModel->GetActiveTool(2));
+ ActiveToolChanged(0, gameModel->GetActiveTool(0));
+ ActiveToolChanged(1, gameModel->GetActiveTool(1));
+ ActiveToolChanged(2, gameModel->GetActiveTool(2));
//sim = new Simulation();
Client::Ref().AddListener(this);
@@ -930,9 +930,13 @@ std::vector<Menu*> GameController::GetMenuList()
return gameModel->GetMenuList();
}
-void GameController::SetActiveTool(int toolSelection, Tool * tool)
+void GameController::ActiveToolChanged(int toolSelection, Tool *tool)
{
commandInterface->OnActiveToolChanged(toolSelection, tool);
+}
+
+void GameController::SetActiveTool(int toolSelection, Tool * tool)
+{
gameModel->SetActiveTool(toolSelection, tool);
gameModel->GetRenderer()->gravityZonesEnabled = false;
gameModel->SetLastTool(tool);