diff --git a/Zframework/init.lua b/Zframework/init.lua index 823ebd61..d539dddc 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -132,13 +132,13 @@ function love.touchpressed(id,x,y) end x,y=xOy:inverseTransformPoint(x,y) lastX,lastY=x,y - if SCN.touchDown then SCN.touchDown(id,x,y)end + if SCN.touchDown then SCN.touchDown(x,y)end if kb.hasTextInput()then kb.setTextInput(false)end end function love.touchmoved(id,x,y,dx,dy) if SCN.swapping then return end x,y=xOy:inverseTransformPoint(x,y) - if SCN.touchMove then SCN.touchMove(id,x,y,dx/SCR.k,dy/SCR.k)end + if SCN.touchMove then SCN.touchMove(x,y,dx/SCR.k,dy/SCR.k)end if WIDGET.sel then if touching then WIDGET.drag(x,y,dx,dy) @@ -161,7 +161,7 @@ function love.touchreleased(id,x,y) WIDGET.sel=false end end - if SCN.touchUp then SCN.touchUp(id,x,y)end + if SCN.touchUp then SCN.touchUp(x,y)end if(x-lastX)^2+(y-lastY)^2<26 then if SCN.touchClick then SCN.touchClick(x,y)end SYSFX.newTap(3,x,y,30) diff --git a/parts/scenes/custom_field.lua b/parts/scenes/custom_field.lua index e43b2e00..d8463c53 100644 --- a/parts/scenes/custom_field.lua +++ b/parts/scenes/custom_field.lua @@ -50,10 +50,10 @@ function scene.wheelMoved(_,y) if pen==0 then pen=24 end end end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) scene.mouseMove(x,y) end -function scene.touchMove(_,x,y) +function scene.touchMove(x,y) local sx,sy=int((x-200)/30)+1,20-int((y-60)/30) if sx<1 or sx>10 then sx=nil end if sy<1 or sy>20 then sy=nil end diff --git a/parts/scenes/mg_15p.lua b/parts/scenes/mg_15p.lua index dfca93db..dd3943f3 100644 --- a/parts/scenes/mg_15p.lua +++ b/parts/scenes/mg_15p.lua @@ -183,10 +183,10 @@ function scene.mouseMove(x,y) tapBoard(x,y) end end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) tapBoard(x,y) end -function scene.touchMove(_,x,y) +function scene.touchMove(x,y) if slide then tapBoard(x,y) end diff --git a/parts/scenes/mg_2048.lua b/parts/scenes/mg_2048.lua index 0fd79c03..63a3e2fa 100644 --- a/parts/scenes/mg_2048.lua +++ b/parts/scenes/mg_2048.lua @@ -250,7 +250,7 @@ function scene.mouseDown(x,y,k) end end end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) scene.mouseDown(x,y) end local moveFunc={ diff --git a/parts/scenes/mg_UTTT.lua b/parts/scenes/mg_UTTT.lua index efa229f3..3dc5f63d 100644 --- a/parts/scenes/mg_UTTT.lua +++ b/parts/scenes/mg_UTTT.lua @@ -202,15 +202,15 @@ function scene.draw() end end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) scene.mouseMove(x,y) end -function scene.touchMove(_,x,y) +function scene.touchMove(x,y) scene.mouseMove(x,y) end -function scene.touchUp(_,x,y) +function scene.touchUp(x,y) scene.mouseDown(x,y) end diff --git a/parts/scenes/mg_cubefield.lua b/parts/scenes/mg_cubefield.lua index 5f288c5e..2cdea8f7 100644 --- a/parts/scenes/mg_cubefield.lua +++ b/parts/scenes/mg_cubefield.lua @@ -66,7 +66,7 @@ function scene.sceneInit() BG.set("none") end -function scene.touchDown(_,x) +function scene.touchDown(x) if play then if x<640 then moveDir=-1 @@ -75,7 +75,7 @@ function scene.touchDown(_,x) end end end -function scene.touchUp(_,x) +function scene.touchUp(x) if play then local L=tc.getTouches() if x<640 then diff --git a/parts/scenes/mg_get10.lua b/parts/scenes/mg_get10.lua index 8f1be430..fe35f874 100644 --- a/parts/scenes/mg_get10.lua +++ b/parts/scenes/mg_get10.lua @@ -147,13 +147,13 @@ function scene.mouseDown(x,y) merge() end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) scene.mouseMove(x,y) end -function scene.touchMove(_,x,y) +function scene.touchMove(x,y) scene.mouseMove(x,y) end -function scene.touchClick(_,x,y) +function scene.touchClick(x,y) scene.mouseDown(x,y) end diff --git a/parts/scenes/mg_pong.lua b/parts/scenes/mg_pong.lua index 6525c5c3..8e65da77 100644 --- a/parts/scenes/mg_pong.lua +++ b/parts/scenes/mg_pong.lua @@ -61,11 +61,11 @@ function scene.keyDown(key) SCN.back() end end -function scene.touchDown(id,x,y) - scene.touchMove(id,x,y) +function scene.touchDown(x,y) + scene.touchMove(x,y) if state==0 then start()end end -function scene.touchMove(_,x,y)(x<640 and p1 or p2).y0=y end +function scene.touchMove(x,y)(x<640 and p1 or p2).y0=y end function scene.mouseMove(x,y)(x<640 and p1 or p2).y0=y end --Rect Area X:150~1130 Y:20~700 diff --git a/parts/scenes/mg_schulteG.lua b/parts/scenes/mg_schulteG.lua index 8b7d37d8..d08760b4 100644 --- a/parts/scenes/mg_schulteG.lua +++ b/parts/scenes/mg_schulteG.lua @@ -77,7 +77,7 @@ end function scene.mouseDown(x,y) tapBoard(x,y) end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) tapBoard(x,y) end function scene.keyDown(key) diff --git a/parts/scenes/mod.lua b/parts/scenes/mod.lua index a0f3e864..8678e341 100644 --- a/parts/scenes/mod.lua +++ b/parts/scenes/mod.lua @@ -65,10 +65,10 @@ function scene.mouseDown(x,y,k) end end end -function scene.touchMove(_,x,y) +function scene.touchMove(x,y) scene.mouseMove(x,y) end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) scene.mouseMove(x,y) scene.mouseDown(x,y) end diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index bb09e54c..1d26ae90 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -93,7 +93,7 @@ end function scene.touchDown() touchDist=false end -function scene.touchMove(_,x,y,dx,dy) +function scene.touchMove(x,y,dx,dy) local L=tc.getTouches() if not L[2]then moveMap(dx,dy) diff --git a/parts/scenes/net_game.lua b/parts/scenes/net_game.lua index c421db8a..03bcc185 100644 --- a/parts/scenes/net_game.lua +++ b/parts/scenes/net_game.lua @@ -52,7 +52,7 @@ function scene.sceneInit() heartBeatTimer=0 end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) if noTouch then return end local t=onVirtualkey(x,y) @@ -61,7 +61,7 @@ function scene.touchDown(_,x,y) pressVirtualkey(t,x,y) end end -function scene.touchUp(_,x,y) +function scene.touchUp(x,y) if noTouch then return end local t=onVirtualkey(x,y) diff --git a/parts/scenes/play.lua b/parts/scenes/play.lua index 95e8e0e3..4990d862 100644 --- a/parts/scenes/play.lua +++ b/parts/scenes/play.lua @@ -30,7 +30,7 @@ local function restart() resetGameData(GAME.frame<240 and"q") noKey=GAME.replaying end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) if noTouch then return end local t=onVirtualkey(x,y) @@ -39,7 +39,7 @@ function scene.touchDown(_,x,y) pressVirtualkey(t,x,y) end end -function scene.touchUp(_,x,y) +function scene.touchUp(x,y) if noTouch then return end local t=onVirtualkey(x,y) diff --git a/parts/scenes/setting_sound.lua b/parts/scenes/setting_sound.lua index 3ca485a5..effea2a4 100644 --- a/parts/scenes/setting_sound.lua +++ b/parts/scenes/setting_sound.lua @@ -29,7 +29,7 @@ function scene.mouseDown(x,y) end end end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) scene.mouseDown(x,y) end diff --git a/parts/scenes/setting_touch.lua b/parts/scenes/setting_touch.lua index 278a57b3..da248f60 100644 --- a/parts/scenes/setting_touch.lua +++ b/parts/scenes/setting_touch.lua @@ -50,7 +50,7 @@ function scene.mouseUp() B.x,B.y=int(B.x/k+.5)*k,int(B.y/k+.5)*k end end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) selected=onVK_org(x,y)or selected end function scene.touchUp() @@ -60,7 +60,7 @@ function scene.touchUp() B.x,B.y=int(B.x/k+.5)*k,int(B.y/k+.5)*k end end -function scene.touchMove(_,_,_,dx,dy) +function scene.touchMove(_,_,dx,dy) if selected and not WIDGET.sel then local B=VK_org[selected] B.x,B.y=B.x+dx,B.y+dy diff --git a/parts/scenes/staff.lua b/parts/scenes/staff.lua index 73b215e8..71f36f27 100644 --- a/parts/scenes/staff.lua +++ b/parts/scenes/staff.lua @@ -22,7 +22,7 @@ function scene.mouseDown(x,y) end end -function scene.touchDown(_,x,y) +function scene.touchDown(x,y) scene.mouseDown(x,y) end