旋转系统可以开关每个方块是否显示旋转中心

This commit is contained in:
MrZ626
2021-07-21 16:29:04 +08:00
parent 854776dac0
commit 5bf5d44c96
2 changed files with 21 additions and 9 deletions

View File

@@ -684,9 +684,10 @@ function draw.norm(P)
local centerX=30*(P.curX+P.cur.sc[2])-15
--Draw ghost & rotation center
local centerDisp=ENV.center and P.RS.centerDisp[P.cur.id]
if ENV.ghost then
drawGhost[ENV.ghostType](P,curColor,ENV.ghost)
if ENV.center then
if centerDisp then
gc_setColor(1,1,1,ENV.center)
gc_draw(spinCenterImg,centerX,-30*(P.ghoY+P.cur.sc[1])+15,nil,nil,nil,4,4)
end
@@ -700,7 +701,7 @@ function draw.norm(P)
if ENV.block then
drawBlockOutline(P,P.skinLib[curColor],trans)
drawBlock(P,curColor)
if ENV.center then
if centerDisp then
gc_setColor(1,1,1,ENV.center)
gc_draw(spinCenterImg,centerX,-30*(P.curY+P.cur.sc[1])+15,nil,nil,nil,4,4)
end