调整确认删除的提醒问号时间计算方法和位置
This commit is contained in:
@@ -84,7 +84,7 @@ function scene.keyDown(key,isRep)
|
||||
elseif key=="m"then
|
||||
SCN.go('custom_mission','swipeD')
|
||||
elseif key=="delete"then
|
||||
if sure>20 then
|
||||
if sure>.3 then
|
||||
TABLE.cut(FIELD)TABLE.cut(BAG)TABLE.cut(MISSION)
|
||||
FIELD[1]=DATA.newBoard()
|
||||
freshMiniFieldVisible()
|
||||
@@ -96,7 +96,7 @@ function scene.keyDown(key,isRep)
|
||||
BG.set(CUSTOMENV.bg)
|
||||
BGM.play(CUSTOMENV.bgm)
|
||||
else
|
||||
sure=50
|
||||
sure=1
|
||||
end
|
||||
elseif key=="f1"then
|
||||
SCN.go('mod','swipeD')
|
||||
@@ -133,8 +133,8 @@ function scene.keyDown(key,isRep)
|
||||
end
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
if sure>0 then sure=sure-1 end
|
||||
function scene.update(dt)
|
||||
if sure>0 then sure=sure-dt end
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
@@ -184,7 +184,7 @@ function scene.draw()
|
||||
|
||||
--Confirm reset
|
||||
if sure>0 then
|
||||
gc.setColor(1,1,1,sure*.02)
|
||||
gc.setColor(1,1,1,sure)
|
||||
gc.draw(TEXTURE.sure,920,50)
|
||||
end
|
||||
gc.translate(0, WIDGET.scrollPos)
|
||||
|
||||
@@ -172,12 +172,12 @@ function scene.keyDown(key)
|
||||
pTouch(penX,penY)
|
||||
end
|
||||
elseif key=="delete"then
|
||||
if sure>20 then
|
||||
if sure>.3 then
|
||||
for y=1,20 do for x=1,10 do FIELD[page][y][x]=0 end end
|
||||
sure=0
|
||||
SFX.play('finesseError',.7)
|
||||
else
|
||||
sure=50
|
||||
sure=1
|
||||
end
|
||||
elseif key=="j"then
|
||||
demo=not demo
|
||||
@@ -256,8 +256,8 @@ function scene.keyUp(key)
|
||||
end
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
if sure>0 then sure=sure-1 end
|
||||
function scene.update(dt)
|
||||
if sure>0 then sure=sure-dt end
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
@@ -427,8 +427,8 @@ function scene.draw()
|
||||
|
||||
--Confirm reset
|
||||
if sure>0 then
|
||||
gc.setColor(1,1,1,sure*.02)
|
||||
gc.draw(TEXTURE.sure,1070,490)
|
||||
gc.setColor(1,1,1,sure)
|
||||
mDraw(TEXTURE.sure,990,530,nil,1.2)
|
||||
end
|
||||
|
||||
--Block name
|
||||
|
||||
@@ -62,13 +62,13 @@ function scene.keyDown(key)
|
||||
end
|
||||
end
|
||||
elseif key=="delete"then
|
||||
if sure>20 then
|
||||
if sure>.3 then
|
||||
TABLE.cut(MISSION)
|
||||
cur=0
|
||||
sure=0
|
||||
SFX.play('finesseError',.7)
|
||||
else
|
||||
sure=50
|
||||
sure=1
|
||||
end
|
||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||
if #MISSION>0 then
|
||||
@@ -116,8 +116,8 @@ function scene.keyDown(key)
|
||||
end
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
if sure>0 then sure=sure-1 end
|
||||
function scene.update(dt)
|
||||
if sure>0 then sure=sure-dt end
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
@@ -184,8 +184,8 @@ function scene.draw()
|
||||
|
||||
--Confirm reset
|
||||
if sure>0 then
|
||||
gc.setColor(1,1,1,sure*.02)
|
||||
gc.draw(TEXTURE.sure,980,600)
|
||||
gc.setColor(1,1,1,sure)
|
||||
mDraw(TEXTURE.sure,1000,640,nil,.9)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -67,13 +67,13 @@ function scene.keyDown(key)
|
||||
end
|
||||
end
|
||||
elseif key=="delete"then
|
||||
if sure>20 then
|
||||
if sure>.3 then
|
||||
TABLE.cut(BAG)
|
||||
cur=0
|
||||
sure=0
|
||||
SFX.play('finesseError',.7)
|
||||
else
|
||||
sure=50
|
||||
sure=1
|
||||
end
|
||||
elseif key=="="then
|
||||
local l={1,2,3,4,5,6,7}
|
||||
@@ -124,8 +124,8 @@ function scene.keyDown(key)
|
||||
end
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
if sure>0 then sure=sure-1 end
|
||||
function scene.update(dt)
|
||||
if sure>0 then sure=sure-dt end
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
@@ -187,8 +187,8 @@ function scene.draw()
|
||||
|
||||
--Confirm reset
|
||||
if sure>0 then
|
||||
gc.setColor(1,1,1,sure*.02)
|
||||
gc.draw(TEXTURE.sure,1050,430,nil,.6)
|
||||
gc.setColor(1,1,1,sure)
|
||||
mDraw(TEXTURE.sure,1000,460,nil,.8)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local gc=love.graphics
|
||||
local gc_setColor=gc.setColor
|
||||
local gc_draw,gc_rectangle=gc.draw,gc.rectangle
|
||||
local gc_rectangle=gc.rectangle
|
||||
local gc_print,gc_printf=gc.print,gc.printf
|
||||
|
||||
local setFont=setFont
|
||||
@@ -78,7 +78,7 @@ function scene.keyDown(key)
|
||||
elseif key=="delete"then
|
||||
local rep=listBox:getSel()
|
||||
if rep then
|
||||
if sure>20 then
|
||||
if sure>.3 then
|
||||
sure=0
|
||||
listBox:remove()
|
||||
love.filesystem.remove(rep.fileName)
|
||||
@@ -90,7 +90,7 @@ function scene.keyDown(key)
|
||||
end
|
||||
SFX.play('finesseError',.7)
|
||||
else
|
||||
sure=50
|
||||
sure=1
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -98,15 +98,15 @@ function scene.keyDown(key)
|
||||
end
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
if sure>0 then sure=sure-1 end
|
||||
function scene.update(dt)
|
||||
if sure>0 then sure=sure-dt end
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
--Confirm delete
|
||||
if sure>0 then
|
||||
gc_setColor(1,1,1,sure*.02)
|
||||
gc_draw(TEXTURE.sure,910,610)
|
||||
gc_setColor(1,1,1,sure)
|
||||
mDraw(TEXTURE.sure,930,640,nil,.9)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -115,7 +115,6 @@ scene.widgetList={
|
||||
WIDGET.newButton{name="play",x=700,y=640,w=170,h=80,color='lY',code=pressKey"return",hideF=function()return listBox:getLen()==0 end,fText=DOGC{50,50,{'fPoly',10,0,49,24,10,49}}},
|
||||
WIDGET.newButton{name="delete",x=850,y=640,w=80,h=80,color='lR',code=pressKey"delete",hideF=function()return listBox:getLen()==0 end,fText=DOGC{50,50,{'setLW',8},{'line',5,5,45,45},{'line',5,45,45,5}}},
|
||||
WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene},
|
||||
WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene},
|
||||
}
|
||||
|
||||
return scene
|
||||
Reference in New Issue
Block a user