整理代码
This commit is contained in:
@@ -43,8 +43,8 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newImage{name="pay1", x=20, y=20},
|
||||
WIDGET.newImage{name="pay2", x=1014, y=20},
|
||||
WIDGET.newButton{name="staff", x=1140, y=400,w=220,h=80,font=35,code=goScene"staff"},
|
||||
WIDGET.newButton{name="his", x=1140, y=500,w=220,h=80,font=35,code=goScene"history"},
|
||||
WIDGET.newButton{name="staff", x=1140, y=400,w=220,h=80,font=35,code=goScene'staff'},
|
||||
WIDGET.newButton{name="his", x=1140, y=500,w=220,h=80,font=35,code=goScene'history'},
|
||||
WIDGET.newButton{name="qq", x=1140, y=600,w=220,h=80,font=35,code=function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,hide=MOBILE},
|
||||
WIDGET.newButton{name="back", x=640, y=600,w=170,h=80,font=35,code=backScene},
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ function commands.test()
|
||||
end
|
||||
do--commands.applet(name)
|
||||
local appList={"15p","grid","pong","atoz","uttt","cube","2048","ten","tap","dtw","cannon","dropper","calc","reflect","polyforge"}
|
||||
local appScene={"app_15p","app_schulteG","app_pong","app_AtoZ","app_UTTT","app_cubefield","app_2048","app_ten","app_tap","app_dtw","app_cannon","app_dropper","app_calc","app_reflect","app_polyforge"}
|
||||
local appScene={'app_15p','app_schulteG','app_pong','app_AtoZ','app_UTTT','app_cubefield','app_2048','app_ten','app_tap','app_dtw','app_cannon','app_dropper','app_calc','app_reflect','app_polyforge'}
|
||||
local appDescription={
|
||||
"15 Puzzle, a.k.a. sliding puzzle",
|
||||
"Schulte Grid",
|
||||
|
||||
@@ -36,7 +36,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newKey{name="console",x=940,y=640,w=170,h=80,font=40,code=goScene"app_console"},
|
||||
WIDGET.newKey{name="console",x=940,y=640,w=170,h=80,font=40,code=goScene'app_console'},
|
||||
WIDGET.newKey{name="quit",x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ function scene.sceneInit()
|
||||
end
|
||||
|
||||
function scene.mouseDown()
|
||||
SCN.go(SETTING.simpMode and"main_simple"or"main")
|
||||
SCN.go(SETTING.simpMode and'main_simple'or'main')
|
||||
end
|
||||
function scene.touchDown()
|
||||
scene.mouseDown()
|
||||
|
||||
@@ -20,9 +20,9 @@ scene.widgetList={
|
||||
WIDGET.newText{name="version", x=950,y=280,color='Z',font=30,align='L',fText=VERSION.string},
|
||||
WIDGET.newButton{name="sprint", x=260,y=480,w=260,font=50,code=function()loadGame('sprint_40l',true)end},
|
||||
WIDGET.newButton{name="marathon",x=640,y=480,w=260,font=50,code=function()loadGame('marathon_n',true)end},
|
||||
WIDGET.newButton{name="setting",x=1000,y=400,w=120,fText="...",font=50,code=goScene"setting_game"},
|
||||
WIDGET.newButton{name="lang", x=1000,y=560,w=120,fText="言/A",font=40,code=goScene"lang"},
|
||||
WIDGET.newButton{name="manual", x=1160,y=400,w=120,fText="?",font=80,code=goScene"manual"},
|
||||
WIDGET.newButton{name="setting",x=1000,y=400,w=120,fText="...",font=50,code=goScene'setting_game'},
|
||||
WIDGET.newButton{name="lang", x=1000,y=560,w=120,fText="言/A",font=40,code=goScene'lang'},
|
||||
WIDGET.newButton{name="manual", x=1160,y=400,w=120,fText="?",font=80,code=goScene'manual'},
|
||||
WIDGET.newButton{name="quit", x=1160,y=560,w=120,fText="X",font=70,code=function()VOC.play('bye')SCN.swapTo('quit','slowFade')end},
|
||||
}
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newKey{name="mod", x=140,y=655,w=220,h=80,font=35,code=goScene"mod"},
|
||||
WIDGET.newKey{name="mod", x=140,y=655,w=220,h=80,font=35,code=goScene'mod'},
|
||||
WIDGET.newButton{name="start", x=1040,y=655,w=180,h=80,font=40,code=pressKey"return",hideF=function()return not mapCam.sel end},
|
||||
WIDGET.newButton{name="back", x=1200,y=655,w=120,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ function scene.keyDown(key)
|
||||
if key=="q"then
|
||||
SCN.back()
|
||||
elseif key=="escape"then
|
||||
SCN.swapTo(GAME.result and"game"or"depause",'none')
|
||||
SCN.swapTo(GAME.result and'game'or'depause','none')
|
||||
elseif key=="s"then
|
||||
GAME.prevBG=BG.cur
|
||||
SCN.go('setting_sound')
|
||||
|
||||
@@ -21,15 +21,15 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=640,y=15,font=80},
|
||||
|
||||
WIDGET.newButton{name="graphic", x=200, y=80, w=240,h=80, color='lC',font=35,code=swapScene("setting_video",'swipeR')},
|
||||
WIDGET.newButton{name="sound", x=1080, y=80, w=240,h=80, color='lC',font=35,code=swapScene("setting_sound",'swipeL')},
|
||||
WIDGET.newButton{name="graphic", x=200, y=80, w=240,h=80, color='lC',font=35,code=swapScene('setting_video','swipeR')},
|
||||
WIDGET.newButton{name="sound", x=1080, y=80, w=240,h=80, color='lC',font=35,code=swapScene('setting_sound','swipeL')},
|
||||
|
||||
WIDGET.newButton{name="ctrl", x=290, y=220, w=320,h=80, color='lY',font=35,code=goScene"setting_control"},
|
||||
WIDGET.newButton{name="key", x=640, y=220, w=320,h=80, color='lG',font=35,code=goScene"setting_key"},
|
||||
WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80, color='lB',font=35,code=goScene"setting_touch"},
|
||||
WIDGET.newButton{name="ctrl", x=290, y=220, w=320,h=80, color='lY',font=35,code=goScene'setting_control'},
|
||||
WIDGET.newButton{name="key", x=640, y=220, w=320,h=80, color='lG',font=35,code=goScene'setting_key'},
|
||||
WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80, color='lB',font=35,code=goScene'setting_touch'},
|
||||
WIDGET.newSlider{name="reTime", x=330, y=320, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end},
|
||||
WIDGET.newSelector{name="RS", x=300, y=420, w=300,color='S',list={'TRS','SRS','C2','C2sym','Classic','None'},disp=SETval("RS"),code=SETsto("RS")},
|
||||
WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene"setting_skin"},
|
||||
WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene'setting_skin'},
|
||||
WIDGET.newSwitch{name="autoPause", x=1060, y=310, font=30,disp=SETval("autoPause"), code=SETrev("autoPause")},
|
||||
WIDGET.newSwitch{name="swap", x=1060, y=370, font=25,disp=SETval("swap"), code=SETrev("swap")},
|
||||
WIDGET.newSwitch{name="fine", x=1060, y=430, font=30,disp=SETval("fine"), code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end},
|
||||
@@ -38,8 +38,8 @@ scene.widgetList={
|
||||
code=function()
|
||||
SETTING.simpMode=not SETTING.simpMode
|
||||
for i=1,#SCN.stack,2 do
|
||||
if SCN.stack[i]=="main"or SCN.stack[i]=="main_simple"then
|
||||
SCN.stack[i]=SETTING.simpMode and"main_simple"or"main"
|
||||
if SCN.stack[i]=='main'or SCN.stack[i]=='main_simple'then
|
||||
SCN.stack[i]=SETTING.simpMode and'main_simple'or'main'
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
@@ -57,8 +57,8 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=640,y=15,font=80},
|
||||
|
||||
WIDGET.newButton{name="game", x=200, y=80,w=240,h=80,color='lC',font=35,code=swapScene("setting_game",'swipeR')},
|
||||
WIDGET.newButton{name="graphic",x=1080, y=80,w=240,h=80,color='lC',font=35,code=swapScene("setting_video",'swipeL')},
|
||||
WIDGET.newButton{name="game", x=200, y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_game','swipeR')},
|
||||
WIDGET.newButton{name="graphic",x=1080, y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_video','swipeL')},
|
||||
|
||||
WIDGET.newSlider{name="sfx", x=180, y=200,w=400, font=35,change=function()SFX.play('blip_1')end,disp=SETval("sfx"),code=SETsto("sfx")},
|
||||
WIDGET.newSlider{name="spawn", x=180, y=300,w=400, font=30,change=function()SFX.fplay("spawn_"..math.random(7),SETTING.sfx_spawn)end,disp=SETval("sfx_spawn"),code=SETsto("sfx_spawn")},
|
||||
|
||||
@@ -10,8 +10,8 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=640,y=15,font=80},
|
||||
|
||||
WIDGET.newButton{name="sound", x=200,y=80,w=240,h=80,color='lC',font=35,code=swapScene("setting_sound",'swipeR')},
|
||||
WIDGET.newButton{name="game", x=1080,y=80,w=240,h=80,color='lC',font=35,code=swapScene("setting_game",'swipeL')},
|
||||
WIDGET.newButton{name="sound", x=200,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_sound','swipeR')},
|
||||
WIDGET.newButton{name="game", x=1080,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_game','swipeL')},
|
||||
|
||||
WIDGET.newSwitch{name="block", x=270,y=160,disp=SETval("block"),code=SETrev("block")},
|
||||
WIDGET.newSwitch{name="smooth", x=270,y=210,disp=SETval("smooth"),code=SETrev("smooth")},
|
||||
|
||||
@@ -97,7 +97,7 @@ end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="path",x=1000,y=540,w=250,h=80,font=25,code=function()love.system.openURL(SAVEDIR)end,hide=MOBILE},
|
||||
WIDGET.newButton{name="save",x=1000,y=640,w=250,h=80,font=25,code=goScene"savedata"},
|
||||
WIDGET.newButton{name="save",x=1000,y=640,w=250,h=80,font=25,code=goScene'savedata'},
|
||||
WIDGET.newButton{name="back",x=640,y=620,w=200,h=80,font=35,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user