模式地图支持按住ctrl或alt后方向键功能变为缩放 close #101

This commit is contained in:
MrZ626
2021-07-06 21:05:24 +08:00
parent f3d8c6b98a
commit 5ceb59daae

View File

@@ -159,6 +159,9 @@ function scene.update()
end end
if F then if F then
mapCam.keyCtrl=true mapCam.keyCtrl=true
if kb.isDown("lctrl","rctrl","lalt","ralt")then
scene.wheelMoved(nil,(dy-dx)*.026)
else
moveMap(dx,dy) moveMap(dx,dy)
local x,y=getPos() local x,y=getPos()
for name,M in next,MODES do for name,M in next,MODES do
@@ -179,6 +182,7 @@ function scene.update()
end end
end end
end end
end
local _=SCN.stat.tar local _=SCN.stat.tar
mapCam.zoomMethod=_=="game"and 1 or _=="mode"and 2 mapCam.zoomMethod=_=="game"and 1 or _=="mode"and 2