mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-16 21:34:01 +02:00
Change zoom size with [ and ], fixes #90
This commit is contained in:
@@ -264,9 +264,9 @@ void GameController::AdjustZoomSize(int direction, bool logarithmic)
|
||||
{
|
||||
int newSize;
|
||||
if(logarithmic)
|
||||
newSize = gameModel->GetZoomSize()+direction;
|
||||
else
|
||||
newSize = gameModel->GetZoomSize()+(((gameModel->GetZoomSize()/10)>0?(gameModel->GetZoomSize()/10):1)*direction);
|
||||
else
|
||||
newSize = gameModel->GetZoomSize()+direction;
|
||||
if(newSize<5)
|
||||
newSize = 5;
|
||||
if(newSize>64)
|
||||
|
@@ -1275,10 +1275,16 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool
|
||||
c->OpenStamps();
|
||||
break;
|
||||
case ']':
|
||||
c->AdjustBrushSize(1, !alt, shiftBehaviour, ctrlBehaviour);
|
||||
if(zoomEnabled && !zoomCursorFixed)
|
||||
c->AdjustZoomSize(1, !alt);
|
||||
else
|
||||
c->AdjustBrushSize(1, !alt, shiftBehaviour, ctrlBehaviour);
|
||||
break;
|
||||
case '[':
|
||||
c->AdjustBrushSize(-1, !alt, shiftBehaviour, ctrlBehaviour);
|
||||
if(zoomEnabled && !zoomCursorFixed)
|
||||
c->AdjustZoomSize(-1, !alt);
|
||||
else
|
||||
c->AdjustBrushSize(-1, !alt, shiftBehaviour, ctrlBehaviour);
|
||||
break;
|
||||
case 'i':
|
||||
if(ctrl)
|
||||
|
Reference in New Issue
Block a user