mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-20 07:01:27 +02:00
Alt Z to stick zoom to cursor, disable cursor rendering when zoom is being placed. Fixes #32
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user