summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-10 17:59:05 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-10 17:59:05 (GMT)
commit3499cb3035e64ed91adfbabdfa9b979e9f8e0885 (patch)
tree1036f4f2fab5301981457a07a8a39df5021fe727 /src/game/GameController.cpp
parentcd051924d9ca6d5c39e02111bc311fda9126435e (diff)
downloadpowder-3499cb3035e64ed91adfbabdfa9b979e9f8e0885.zip
powder-3499cb3035e64ed91adfbabdfa9b979e9f8e0885.tar.gz
Wall brush, fixes #63
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 9636c8f..02dd4df 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -276,6 +276,7 @@ void GameController::DrawRect(int toolSelection, ui::Point point1, ui::Point poi
{
Simulation * sim = gameModel->GetSimulation();
Tool * activeTool = gameModel->GetActiveTool(toolSelection);
+ gameModel->SetLastTool(activeTool);
Brush * cBrush = gameModel->GetBrush();
if(!activeTool || !cBrush)
return;
@@ -287,6 +288,7 @@ void GameController::DrawLine(int toolSelection, ui::Point point1, ui::Point poi
{
Simulation * sim = gameModel->GetSimulation();
Tool * activeTool = gameModel->GetActiveTool(toolSelection);
+ gameModel->SetLastTool(activeTool);
Brush * cBrush = gameModel->GetBrush();
if(!activeTool || !cBrush)
return;
@@ -298,6 +300,7 @@ void GameController::DrawFill(int toolSelection, ui::Point point)
{
Simulation * sim = gameModel->GetSimulation();
Tool * activeTool = gameModel->GetActiveTool(toolSelection);
+ gameModel->SetLastTool(activeTool);
Brush * cBrush = gameModel->GetBrush();
if(!activeTool || !cBrush)
return;
@@ -309,6 +312,7 @@ void GameController::DrawPoints(int toolSelection, queue<ui::Point*> & pointQueu
{
Simulation * sim = gameModel->GetSimulation();
Tool * activeTool = gameModel->GetActiveTool(toolSelection);
+ gameModel->SetLastTool(activeTool);
Brush * cBrush = gameModel->GetBrush();
if(!activeTool || !cBrush)
{
@@ -701,6 +705,7 @@ void GameController::SetActiveTool(int toolSelection, Tool * tool)
{
gameModel->SetActiveTool(toolSelection, tool);
gameModel->GetRenderer()->gravityZonesEnabled = false;
+ gameModel->SetLastTool(tool);
for(int i = 0; i < 3; i++)
{
if(gameModel->GetActiveTool(i) == gameModel->GetMenuList().at(SC_WALL)->GetToolList().at(WL_GRAV))