summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-05-13 16:43:41 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-05-13 16:43:41 (GMT)
commit4032a0469b1f40f7197468f34986e365bd6e7314 (patch)
treef324519139168068628f8d6e0fc8046001c9c0a1 /src/game/GameController.cpp
parenta2e91c247fab4a2cee8936d83979f4a72390f7e7 (diff)
downloadpowder-4032a0469b1f40f7197468f34986e365bd6e7314.zip
powder-4032a0469b1f40f7197468f34986e365bd6e7314.tar.gz
Click function for tools that aren't continuous. Debug helper for UI components (Ctrl+Shift D when DEBUG is defined), fix add sign window logic
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 529137a..7f852a6 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -304,6 +304,16 @@ void GameController::DrawPoints(int toolSelection, queue<ui::Point*> & pointQueu
}
}
+void GameController::ToolClick(int toolSelection, ui::Point point)
+{
+ Simulation * sim = gameModel->GetSimulation();
+ Tool * activeTool = gameModel->GetActiveTool(toolSelection);
+ Brush * cBrush = gameModel->GetBrush();
+ if(!activeTool || !cBrush)
+ return;
+ activeTool->Click(sim, cBrush, PointTranslate(point));
+}
+
void GameController::StampRegion(ui::Point point1, ui::Point point2)
{
int saveSize;