整理代码,WIDGET.lnk系列函数移出WIDGET模块

This commit is contained in:
MrZ626
2021-01-05 15:40:43 +08:00
parent 19b2f268a8
commit d329f665b1
44 changed files with 417 additions and 394 deletions

View File

@@ -322,12 +322,12 @@ function scene.draw()
end
scene.widgetList={
WIDGET.newButton{name="setting", x=1120, y=70, w=240,h=90, color="lBlue", font=35,code=WIDGET.lnk_pressKey("s")},
WIDGET.newButton{name="replay", x=535, y=250, w=200,h=100,color="lYellow",font=30,code=WIDGET.lnk_pressKey("p"),hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end},
WIDGET.newButton{name="save", x=745, y=250, w=200,h=100,color="green", font=30,code=WIDGET.lnk_pressKey("o"),hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end},
WIDGET.newButton{name="resume", x=640, y=367, w=240,h=100,color="lGreen", font=30,code=WIDGET.lnk_pressKey("escape")},
WIDGET.newButton{name="restart", x=640, y=483, w=240,h=100,color="lRed", font=35,code=WIDGET.lnk_pressKey("r")},
WIDGET.newButton{name="quit", x=640, y=600, w=240,h=100,font=35,code=WIDGET.lnk_BACK},
WIDGET.newButton{name="setting", x=1120, y=70, w=240,h=90, color="lBlue", font=35,code=pressKey"s"},
WIDGET.newButton{name="replay", x=535, y=250, w=200,h=100,color="lYellow",font=30,code=pressKey"p",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end},
WIDGET.newButton{name="save", x=745, y=250, w=200,h=100,color="green", font=30,code=pressKey"o",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end},
WIDGET.newButton{name="resume", x=640, y=367, w=240,h=100,color="lGreen", font=30,code=pressKey"escape"},
WIDGET.newButton{name="restart", x=640, y=483, w=240,h=100,color="lRed", font=35,code=pressKey"r"},
WIDGET.newButton{name="quit", x=640, y=600, w=240,h=100,font=35,code=backScene},
}
return scene