Alt Z to stick zoom to cursor, disable cursor rendering when zoom is being placed. Fixes #32

This commit is contained in:
Simon Robertshaw
2012-08-10 19:11:59 +01:00
parent 3499cb3035
commit 150114c11f

View File

@@ -1318,7 +1318,7 @@ void GameView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bo
disableShiftBehaviour(); disableShiftBehaviour();
break; break;
case 'z': case 'z':
if(!zoomCursorFixed) if(!zoomCursorFixed && !alt)
c->SetZoomEnabled(false); c->SetZoomEnabled(false);
break; break;
} }
@@ -1647,7 +1647,7 @@ void GameView::OnDraw()
{ {
ren->clearScreen(1.0f); ren->clearScreen(1.0f);
ren->RenderBegin(); ren->RenderBegin();
if(selectMode == SelectNone && activeBrush && currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) if(selectMode == SelectNone && (!zoomEnabled || zoomCursorFixed) && activeBrush && currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES)
{ {
ui::Point finalCurrentMouse = c->PointTranslate(currentMouse); ui::Point finalCurrentMouse = c->PointTranslate(currentMouse);
ui::Point initialDrawPoint = drawPoint1; ui::Point initialDrawPoint = drawPoint1;