diff options
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); |
