Change zoom size with [ and ], fixes #90

This commit is contained in:
Simon Robertshaw 2012-08-10 22:09:04 +01:00
parent c1d7de24f2
commit 92311a38c0
2 changed files with 10 additions and 4 deletions

View File

@ -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)

View File

@ -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)