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