diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-10 13:03:23 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-10 13:03:23 (GMT) |
| commit | 810ea42f99cf9f56c1ac998ce8a203bea01e97b2 (patch) | |
| tree | b3c2bc39bfed051003a6eeab6e990e73ddad5dec /src/game/GameController.cpp | |
| parent | fd40ed234ab157c4e315cb748163969c8ff83b0f (diff) | |
| download | powder-810ea42f99cf9f56c1ac998ce8a203bea01e97b2.zip powder-810ea42f99cf9f56c1ac998ce8a203bea01e97b2.tar.gz | |
Only render gravity lensing if it's enabled, Ctrl and Shift to alter tool strength (Shift = x10, Ctrl = x0.1)
Diffstat (limited to 'src/game/GameController.cpp')
| -rw-r--r-- | src/game/GameController.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 3d36b75..622752b 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -248,6 +248,7 @@ void GameController::DrawRect(int toolSelection, ui::Point point1, ui::Point poi Brush * cBrush = gameModel->GetBrush(); if(!activeTool || !cBrush) return; + activeTool->SetStrength(gameModel->GetToolStrength()); activeTool->DrawRect(sim, cBrush, PointTranslate(point1), PointTranslate(point2)); } @@ -258,6 +259,7 @@ void GameController::DrawLine(int toolSelection, ui::Point point1, ui::Point poi Brush * cBrush = gameModel->GetBrush(); if(!activeTool || !cBrush) return; + activeTool->SetStrength(gameModel->GetToolStrength()); activeTool->DrawLine(sim, cBrush, PointTranslate(point1), PointTranslate(point2)); } @@ -268,6 +270,7 @@ void GameController::DrawFill(int toolSelection, ui::Point point) Brush * cBrush = gameModel->GetBrush(); if(!activeTool || !cBrush) return; + activeTool->SetStrength(gameModel->GetToolStrength()); activeTool->DrawFill(sim, cBrush, PointTranslate(point)); } @@ -288,6 +291,7 @@ void GameController::DrawPoints(int toolSelection, queue<ui::Point*> & pointQueu } } + activeTool->SetStrength(gameModel->GetToolStrength()); if(!pointQueue.empty()) { ui::Point sPoint(0, 0); @@ -595,6 +599,11 @@ void GameController::SetZoomEnabled(bool zoomEnabled) gameModel->SetZoomEnabled(zoomEnabled); } +void GameController::SetToolStrength(float value) +{ + gameModel->SetToolStrength(value); +} + void GameController::SetZoomPosition(ui::Point position) { ui::Point zoomPosition = position-(gameModel->GetZoomSize()/2); |
