summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-10 12:17:19 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-10 12:17:19 (GMT)
commitfd40ed234ab157c4e315cb748163969c8ff83b0f (patch)
treee98093bb702d8b7a199d0f543759fb924fbc6f58 /src/game/GameController.cpp
parent0e67fe028bfb939e9b5158d133413d7e9876005b (diff)
downloadpowder-fd40ed234ab157c4e315cb748163969c8ff83b0f.zip
powder-fd40ed234ab157c4e315cb748163969c8ff83b0f.tar.gz
Impose limit on cursor radius (Limit is radius 128, somewhat smaller than TPT, but I don't think a larger size is necessary), fixes #88
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 06ba1d4..3d36b75 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -187,6 +187,10 @@ void GameController::AdjustBrushSize(int direction, bool logarithmic, bool xAxis
newSize.X = 0;
if(newSize.Y<0)
newSize.Y = 0;
+ if(newSize.X>128)
+ newSize.X = 128;
+ if(newSize.Y>128)
+ newSize.Y = 128;
if(xAxis)
gameModel->GetBrush()->SetRadius(ui::Point(newSize.X, oldSize.Y));