修复手机端滚动控件距离问题,升级SCR模块,增加几个方便的成员变量

This commit is contained in:
MrZ626
2021-05-29 18:41:54 +08:00
parent c55f4d3d62
commit 34fc38961c
6 changed files with 13 additions and 10 deletions

View File

@@ -45,7 +45,7 @@ function back.draw()
gc_clear(.1,.1,.1)
gc_push('transform')
gc_origin()
gc_translate(SCR.w/2,SCR.h/2)
gc_translate(SCR.cx,SCR.cy)
--Squares
gc_setColor(1,1,1,.2)

View File

@@ -44,7 +44,7 @@ function back.draw()
gc_clear(.1,.1,.1)
gc_push('transform')
gc_origin()
gc_translate(SCR.w/2,SCR.h/2)
gc_translate(SCR.cx,SCR.cy)
for i=1,#mino do
local M=mino[i]
local c=M.color

View File

@@ -24,6 +24,6 @@ function back.draw()
end
local _=colorLib[SETTING.skin[R]]
gc.setColor(_[1],_[2],_[3],.12)
gc.draw(TEXTURE.miniBlock[R],SCR.w/2,SCR.h/2,t%3.1416*6,400*SCR.k,nil,scs[R][0][2]+.5,#blocks[R][0]-scs[R][0][1]-.5)
gc.draw(TEXTURE.miniBlock[R],SCR.cx,SCR.cy,t%3.1416*6,400*SCR.k,nil,scs[R][0][2]+.5,#blocks[R][0]-scs[R][0][1]-.5)
end
return back

View File

@@ -19,7 +19,7 @@ function back.draw()
gc.clear(.1,.1,.1)
end
gc.push('transform')
gc.translate(SCR.w/2,SCR.h/2+20*sin(t*.02))
gc.translate(SCR.cx,SCR.cy+20*sin(t*.02))
gc.scale(SCR.k)
gc.scale(1.1626,1.26)
if -t%6.26<.1355 then