summaryrefslogtreecommitdiff
path: root/src/game/GameView.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-10 18:11:59 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-10 18:11:59 (GMT)
commit150114c11fa65aa1c6c29abab8332bf6749da372 (patch)
treeb036c07aa0d33d32e82753aba26a4bc0008b2e43 /src/game/GameView.cpp
parent3499cb3035e64ed91adfbabdfa9b979e9f8e0885 (diff)
downloadpowder-150114c11fa65aa1c6c29abab8332bf6749da372.zip
powder-150114c11fa65aa1c6c29abab8332bf6749da372.tar.gz
Alt Z to stick zoom to cursor, disable cursor rendering when zoom is being placed. Fixes #32
Diffstat (limited to 'src/game/GameView.cpp')
-rw-r--r--src/game/GameView.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index 073d8da..6f52052 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -1318,7 +1318,7 @@ void GameView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bo
disableShiftBehaviour();
break;
case 'z':
- if(!zoomCursorFixed)
+ if(!zoomCursorFixed && !alt)
c->SetZoomEnabled(false);
break;
}
@@ -1647,7 +1647,7 @@ void GameView::OnDraw()
{
ren->clearScreen(1.0f);
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 initialDrawPoint = drawPoint1;