From d329f665b1a11fb8b725dfdaaa05f94045c42e72 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 5 Jan 2021 15:40:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81=EF=BC=8CWI?= =?UTF-8?q?DGET.lnk=E7=B3=BB=E5=88=97=E5=87=BD=E6=95=B0=E7=A7=BB=E5=87=BAW?= =?UTF-8?q?IDGET=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/widget.lua | 13 --- parts/gametoolfunc.lua | 110 ++++++++++++++++++-------- parts/scenes/account.lua | 2 +- parts/scenes/calculator.lua | 38 ++++----- parts/scenes/customGame.lua | 32 ++++---- parts/scenes/custom_advance.lua | 52 ++++++------ parts/scenes/custom_field.lua | 20 ++--- parts/scenes/custom_mission.lua | 82 +++++++++---------- parts/scenes/custom_sequence.lua | 80 +++++++++---------- parts/scenes/dict.lua | 26 +++--- parts/scenes/help.lua | 8 +- parts/scenes/history.lua | 6 +- parts/scenes/lang.lua | 2 +- parts/scenes/login.lua | 2 +- parts/scenes/main.lua | 16 ++-- parts/scenes/mg_15p.lua | 12 +-- parts/scenes/mg_AtoZ.lua | 4 +- parts/scenes/mg_UTTT.lua | 2 +- parts/scenes/mg_cubefield.lua | 2 +- parts/scenes/mg_pong.lua | 4 +- parts/scenes/mg_schulteG.lua | 10 +-- parts/scenes/minigame.lua | 14 ++-- parts/scenes/mod.lua | 4 +- parts/scenes/mode.lua | 6 +- parts/scenes/music.lua | 10 +-- parts/scenes/net_chat.lua | 2 +- parts/scenes/net_game.lua | 2 +- parts/scenes/net_menu.lua | 4 +- parts/scenes/net_rooms.lua | 6 +- parts/scenes/pause.lua | 12 +-- parts/scenes/register.lua | 2 +- parts/scenes/savedata.lua | 2 +- parts/scenes/setting_control.lua | 18 ++--- parts/scenes/setting_game.lua | 28 +++---- parts/scenes/setting_key.lua | 2 +- parts/scenes/setting_skin.lua | 2 +- parts/scenes/setting_sound.lua | 18 ++--- parts/scenes/setting_touch.lua | 2 +- parts/scenes/setting_touchSwitch.lua | 14 ++-- parts/scenes/setting_trackSetting.lua | 8 +- parts/scenes/setting_video.lua | 48 +++++------ parts/scenes/sound.lua | 78 +++++++++--------- parts/scenes/staff.lua | 2 +- parts/scenes/stat.lua | 4 +- 44 files changed, 417 insertions(+), 394 deletions(-) diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 6e9a16cc..9e48a26f 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -792,19 +792,6 @@ end WIDGET.active={}--Table contains all active widgets WIDGET.sel=false--Selected widget -function WIDGET.lnk_BACK() SCN.back()end -function WIDGET.lnk_CUSval(k) return function() return CUSTOMENV[k] end end -function WIDGET.lnk_CUSrev(k) return function() CUSTOMENV[k]=not CUSTOMENV[k] end end -function WIDGET.lnk_CUSsto(k) return function(i) CUSTOMENV[k]=i end end - -function WIDGET.lnk_SETval(k) return function() return SETTING[k] end end -function WIDGET.lnk_SETrev(k) return function() SETTING[k]=not SETTING[k] end end -function WIDGET.lnk_SETsto(k) return function(i) SETTING[k]=i end end - -function WIDGET.lnk_pressKey(k) return function() love.keypressed(k) end end -function WIDGET.lnk_goScene(t,s) return function() SCN.go(t,s) end end -function WIDGET.lnk_swapScene(t,s) return function() SCN.swapTo(t,s) end end - WIDGET.indexMeta={ __index=function(L,k) for i=1,#L do diff --git a/parts/gametoolfunc.lua b/parts/gametoolfunc.lua index 951d36b8..51c5b597 100644 --- a/parts/gametoolfunc.lua +++ b/parts/gametoolfunc.lua @@ -706,45 +706,85 @@ function pumpRecording(str,L) return list end -local noRecList={"custom","solo","round","techmino"} -local function getModList() - local res={} - for _,v in next,GAME.mod do - if v.sel>0 then - ins(res,{v.no,v.sel}) +do--function saveRecording() + local noRecList={"custom","solo","round","techmino"} + local function getModList() + local res={} + for _,v in next,GAME.mod do + if v.sel>0 then + ins(res,{v.no,v.sel}) + end + end + return res + end + function saveRecording() + --Filtering modes that cannot be saved + for _,v in next,noRecList do + if GAME.curModeName:find(v)then + LOG.print("Cannot save recording of this mode now!",COLOR.sky) + return + end + end + + --File contents + local fileName="replay/"..os.date("%Y_%m_%d_%a_%H%M%S.rep") + local fileHead= + os.date("%Y/%m/%d_%A_%H:%M:%S\n").. + GAME.curModeName.."\n".. + VERSION_NAME.."\n".. + (USER.username or"Player") + local fileBody= + GAME.seed.."\n".. + json.encode(GAME.setting).."\n".. + json.encode(getModList()).."\n".. + dumpRecording(GAME.rep) + + --Write file + if not fs.getInfo(fileName)then + fs.write(fileName,fileHead.."\n"..data.compress("string","zlib",fileBody)) + ins(REPLAY,fileName) + FILE.save(REPLAY,"conf/replay") + return true + else + LOG.print("Save failed: File already exists") end end - return res end -function saveRecording() - --Filtering modes that cannot be saved - for _,v in next,noRecList do - if GAME.curModeName:find(v)then - LOG.print("Cannot save recording of this mode now!",COLOR.sky) - return + +function backScene()SCN.back()end +do--function goScene(name,style) + local cache={} + function goScene(name,style) + if not cache[name]then + cache[name]=function()SCN.go(name,style)end end + return cache[name] end - - --File contents - local fileName="replay/"..os.date("%Y_%m_%d_%a_%H%M%S.rep") - local fileHead= - os.date("%Y/%m/%d_%A_%H:%M:%S\n").. - GAME.curModeName.."\n".. - VERSION_NAME.."\n".. - (USER.username or"Player") - local fileBody= - GAME.seed.."\n".. - json.encode(GAME.setting).."\n".. - json.encode(getModList()).."\n".. - dumpRecording(GAME.rep) - - --Write file - if not fs.getInfo(fileName)then - fs.write(fileName,fileHead.."\n"..data.compress("string","zlib",fileBody)) - ins(REPLAY,fileName) - FILE.save(REPLAY,"conf/replay") - return true - else - LOG.print("Save failed: File already exists") +end +do--function swapScene(name,style) + local cache={} + function swapScene(name,style) + if not cache[name]then + cache[name]=function()SCN.swapTo(name,style)end + end + return cache[name] end +end +do--function pressKey(k) + local cache={} + function pressKey(k) + if not cache[k]then + cache[k]=function()love.keypressed(k)end + end + return cache[k] + end +end +do--lnk_CUS/SETXXX(k) + local c,s=CUSTOMENV,SETTING + function lnk_CUSval(k)return function()return c[k] end end + function lnk_SETval(k)return function()return s[k] end end + function lnk_CUSrev(k)return function()c[k]=not c[k]end end + function lnk_SETrev(k)return function()s[k]=not s[k]end end + function lnk_CUSsto(k)return function(i)c[k]=i end end + function lnk_SETsto(k)return function(i)s[k]=i end end end \ No newline at end of file diff --git a/parts/scenes/account.lua b/parts/scenes/account.lua index 892d1696..467052c3 100644 --- a/parts/scenes/account.lua +++ b/parts/scenes/account.lua @@ -8,7 +8,7 @@ end scene.widgetList={ WIDGET.newText{name="title", x=80, y=50,font=70,align="L"}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/calculator.lua b/parts/scenes/calculator.lua index a2da2d6c..c01aaa1b 100644 --- a/parts/scenes/calculator.lua +++ b/parts/scenes/calculator.lua @@ -128,25 +128,25 @@ function scene.draw() end scene.widgetList={ - WIDGET.newKey{name="_1",x=150,y=300,w=90, font=50,code=WIDGET.lnk_pressKey("1")}, - WIDGET.newKey{name="_2",x=250,y=300,w=90, font=50,code=WIDGET.lnk_pressKey("2")}, - WIDGET.newKey{name="_3",x=350,y=300,w=90, font=50,code=WIDGET.lnk_pressKey("3")}, - WIDGET.newKey{name="_4",x=150,y=400,w=90, font=50,code=WIDGET.lnk_pressKey("4")}, - WIDGET.newKey{name="_5",x=250,y=400,w=90, font=50,code=WIDGET.lnk_pressKey("5")}, - WIDGET.newKey{name="_6",x=350,y=400,w=90, font=50,code=WIDGET.lnk_pressKey("6")}, - WIDGET.newKey{name="_7",x=150,y=500,w=90, font=50,code=WIDGET.lnk_pressKey("7")}, - WIDGET.newKey{name="_8",x=250,y=500,w=90, font=50,code=WIDGET.lnk_pressKey("8")}, - WIDGET.newKey{name="_9",x=350,y=500,w=90, font=50,code=WIDGET.lnk_pressKey("9")}, - WIDGET.newKey{name="_0",x=150,y=600,w=90, font=50,code=WIDGET.lnk_pressKey("0")}, - WIDGET.newKey{name=".", x=250,y=600,w=90,color="lPurple",font=50,code=WIDGET.lnk_pressKey(".")}, - WIDGET.newKey{name="e", x=350,y=600,w=90,color="lPurple",font=50,code=WIDGET.lnk_pressKey("e")}, - WIDGET.newKey{name="+", x=450,y=300,w=90,color="lBlue", font=50,code=WIDGET.lnk_pressKey("+")}, - WIDGET.newKey{name="-", x=450,y=400,w=90,color="lBlue", font=50,code=WIDGET.lnk_pressKey("-")}, - WIDGET.newKey{name="*", x=450,y=500,w=90,color="lBlue", font=50,code=WIDGET.lnk_pressKey("*")}, - WIDGET.newKey{name="/", x=450,y=600,w=90,color="lBlue", font=50,code=WIDGET.lnk_pressKey("/")}, - WIDGET.newKey{name="<", x=550,y=300,w=90,color="lRed", font=50,code=WIDGET.lnk_pressKey("backspace")}, - WIDGET.newKey{name="=", x=550,y=400,w=90,color="lYellow",font=50,code=WIDGET.lnk_pressKey("return")}, - WIDGET.newButton{name="play",x=640,y=600,w=180,h=90,color="lGreen",font=40,code=WIDGET.lnk_pressKey("space"),hide=function()return not pass end}, + WIDGET.newKey{name="_1",x=150,y=300,w=90, font=50,code=pressKey"1"}, + WIDGET.newKey{name="_2",x=250,y=300,w=90, font=50,code=pressKey"2"}, + WIDGET.newKey{name="_3",x=350,y=300,w=90, font=50,code=pressKey"3"}, + WIDGET.newKey{name="_4",x=150,y=400,w=90, font=50,code=pressKey"4"}, + WIDGET.newKey{name="_5",x=250,y=400,w=90, font=50,code=pressKey"5"}, + WIDGET.newKey{name="_6",x=350,y=400,w=90, font=50,code=pressKey"6"}, + WIDGET.newKey{name="_7",x=150,y=500,w=90, font=50,code=pressKey"7"}, + WIDGET.newKey{name="_8",x=250,y=500,w=90, font=50,code=pressKey"8"}, + WIDGET.newKey{name="_9",x=350,y=500,w=90, font=50,code=pressKey"9"}, + WIDGET.newKey{name="_0",x=150,y=600,w=90, font=50,code=pressKey"0"}, + WIDGET.newKey{name=".", x=250,y=600,w=90,color="lPurple",font=50,code=pressKey"."}, + WIDGET.newKey{name="e", x=350,y=600,w=90,color="lPurple",font=50,code=pressKey"e"}, + WIDGET.newKey{name="+", x=450,y=300,w=90,color="lBlue", font=50,code=pressKey"+"}, + WIDGET.newKey{name="-", x=450,y=400,w=90,color="lBlue", font=50,code=pressKey"-"}, + WIDGET.newKey{name="*", x=450,y=500,w=90,color="lBlue", font=50,code=pressKey"*"}, + WIDGET.newKey{name="/", x=450,y=600,w=90,color="lBlue", font=50,code=pressKey"/"}, + WIDGET.newKey{name="<", x=550,y=300,w=90,color="lRed", font=50,code=pressKey"backspace"}, + WIDGET.newKey{name="=", x=550,y=400,w=90,color="lYellow",font=50,code=pressKey"return"}, + WIDGET.newButton{name="play",x=640,y=600,w=180,h=90,color="lGreen",font=40,code=pressKey"space",hide=function()return not pass end}, } return scene \ No newline at end of file diff --git a/parts/scenes/customGame.lua b/parts/scenes/customGame.lua index 4e76e477..b2301164 100644 --- a/parts/scenes/customGame.lua +++ b/parts/scenes/customGame.lua @@ -147,29 +147,29 @@ scene.widgetList={ WIDGET.newText{name="noMsn", x=610, y=550,align="L",color="grey",hide=function()return MISSION[1]end}, --Basic - WIDGET.newSelector{name="drop", x=170, y=150,w=220,color="orange", list={0,.125,.25,.5,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},disp=WIDGET.lnk_CUSval("drop"),code=WIDGET.lnk_CUSsto("drop")}, - WIDGET.newSelector{name="lock", x=170, y=230,w=220,color="red", list={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, disp=WIDGET.lnk_CUSval("lock"),code=WIDGET.lnk_CUSsto("lock")}, - WIDGET.newSelector{name="wait", x=410, y=150,w=220,color="green", list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, disp=WIDGET.lnk_CUSval("wait"),code=WIDGET.lnk_CUSsto("wait")}, - WIDGET.newSelector{name="fall", x=410, y=230,w=220,color="yellow", list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, disp=WIDGET.lnk_CUSval("fall"),code=WIDGET.lnk_CUSsto("fall")}, + WIDGET.newSelector{name="drop", x=170, y=150,w=220,color="orange", list={0,.125,.25,.5,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},disp=lnk_CUSval("drop"),code=lnk_CUSsto("drop")}, + WIDGET.newSelector{name="lock", x=170, y=230,w=220,color="red", list={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, disp=lnk_CUSval("lock"),code=lnk_CUSsto("lock")}, + WIDGET.newSelector{name="wait", x=410, y=150,w=220,color="green", list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, disp=lnk_CUSval("wait"),code=lnk_CUSsto("wait")}, + WIDGET.newSelector{name="fall", x=410, y=230,w=220,color="yellow", list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, disp=lnk_CUSval("fall"),code=lnk_CUSsto("fall")}, --Else - WIDGET.newSelector{name="bg", x=1070, y=150,w=250,color="yellow",list=BG.getList(),disp=WIDGET.lnk_CUSval("bg"), code=function(i)CUSTOMENV.bg=i BG.set(i)end}, - WIDGET.newSelector{name="bgm", x=1070, y=230,w=250,color="yellow", list=BGM.getList(), disp=WIDGET.lnk_CUSval("bgm"), code=function(i)CUSTOMENV.bgm=i BGM.play(i)end}, + WIDGET.newSelector{name="bg", x=1070, y=150,w=250,color="yellow",list=BG.getList(),disp=lnk_CUSval("bg"), code=function(i)CUSTOMENV.bg=i BG.set(i)end}, + WIDGET.newSelector{name="bgm", x=1070, y=230,w=250,color="yellow", list=BGM.getList(), disp=lnk_CUSval("bgm"), code=function(i)CUSTOMENV.bgm=i BGM.play(i)end}, --Copy/Paste/Start - WIDGET.newButton{name="copy", x=1070, y=310,w=310,h=70,color="lRed", font=25,code=WIDGET.lnk_pressKey("cC")}, - WIDGET.newButton{name="paste", x=1070, y=390,w=310,h=70,color="lBlue", font=25,code=WIDGET.lnk_pressKey("cV")}, - WIDGET.newButton{name="clear", x=1070, y=470,w=310,h=70,color="lYellow",font=35,code=WIDGET.lnk_pressKey("return")}, - WIDGET.newButton{name="puzzle",x=1070, y=550,w=310,h=70,color="lMagenta",font=35,code=WIDGET.lnk_pressKey("return2"),hide=function()return not initField end}, + WIDGET.newButton{name="copy", x=1070, y=310,w=310,h=70,color="lRed", font=25,code=pressKey"cC"}, + WIDGET.newButton{name="paste", x=1070, y=390,w=310,h=70,color="lBlue", font=25,code=pressKey"cV"}, + WIDGET.newButton{name="clear", x=1070, y=470,w=310,h=70,color="lYellow",font=35,code=pressKey"return"}, + WIDGET.newButton{name="puzzle",x=1070, y=550,w=310,h=70,color="lMagenta",font=35,code=pressKey"return2",hide=function()return not initField end}, --More - WIDGET.newKey{name="advance", x=730, y=190,w=220,h=90,color="red", font=35,code=WIDGET.lnk_goScene("custom_advance")}, - WIDGET.newKey{name="mod", x=730, y=310,w=220,h=90,color="white", font=35,code=WIDGET.lnk_goScene("mod")}, - WIDGET.newKey{name="field", x=170, y=640,w=240,h=80,color="water", font=25,code=WIDGET.lnk_goScene("custom_field")}, - WIDGET.newKey{name="sequence", x=450, y=640,w=240,h=80,color="pink", font=25,code=WIDGET.lnk_goScene("custom_sequence")}, - WIDGET.newKey{name="mission", x=730, y=640,w=240,h=80,color="sky", font=25,code=WIDGET.lnk_goScene("custom_mission")}, + WIDGET.newKey{name="advance", x=730, y=190,w=220,h=90,color="red", font=35,code=goScene"custom_advance"}, + WIDGET.newKey{name="mod", x=730, y=310,w=220,h=90,color="white", font=35,code=goScene"mod"}, + WIDGET.newKey{name="field", x=170, y=640,w=240,h=80,color="water", font=25,code=goScene"custom_field"}, + WIDGET.newKey{name="sequence", x=450, y=640,w=240,h=80,color="pink", font=25,code=goScene"custom_sequence"}, + WIDGET.newKey{name="mission", x=730, y=640,w=240,h=80,color="sky", font=25,code=goScene"custom_mission"}, - WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/custom_advance.lua b/parts/scenes/custom_advance.lua index 2b0096ec..e09a9916 100644 --- a/parts/scenes/custom_advance.lua +++ b/parts/scenes/custom_advance.lua @@ -5,40 +5,40 @@ scene.widgetList={ WIDGET.newText{name="subTitle", x=530,y=50,font=35,align="L",color="grey"}, --Visual - WIDGET.newSwitch{name="block", x=620, y=600, font=25,disp=WIDGET.lnk_CUSval("block"), code=WIDGET.lnk_CUSrev("block")}, - WIDGET.newSlider{name="ghost", x=500, y=450,w=200,unit=.6,font=25,disp=WIDGET.lnk_CUSval("ghost"), code=WIDGET.lnk_CUSsto("ghost")}, - WIDGET.newSlider{name="center", x=500, y=520,w=200,unit=1, font=25,disp=WIDGET.lnk_CUSval("center"), code=WIDGET.lnk_CUSsto("center")}, + WIDGET.newSwitch{name="block", x=620, y=600, font=25,disp=lnk_CUSval("block"), code=lnk_CUSrev("block")}, + WIDGET.newSlider{name="ghost", x=500, y=450,w=200,unit=.6,font=25,disp=lnk_CUSval("ghost"), code=lnk_CUSsto("ghost")}, + WIDGET.newSlider{name="center", x=500, y=520,w=200,unit=1, font=25,disp=lnk_CUSval("center"), code=lnk_CUSsto("center")}, - WIDGET.newSwitch{name="bagLine", x=1190, y=340,disp=WIDGET.lnk_CUSval("bagLine"),code=WIDGET.lnk_CUSrev("bagLine")}, - WIDGET.newSwitch{name="highCam", x=1190, y=410,disp=WIDGET.lnk_CUSval("highCam"),code=WIDGET.lnk_CUSrev("highCam")}, - WIDGET.newSwitch{name="nextPos", x=1190, y=480,disp=WIDGET.lnk_CUSval("nextPos"),code=WIDGET.lnk_CUSrev("nextPos")}, - WIDGET.newSwitch{name="bone", x=1190, y=550,disp=WIDGET.lnk_CUSval("bone"), code=WIDGET.lnk_CUSrev("bone")}, + WIDGET.newSwitch{name="bagLine", x=1190, y=340,disp=lnk_CUSval("bagLine"),code=lnk_CUSrev("bagLine")}, + WIDGET.newSwitch{name="highCam", x=1190, y=410,disp=lnk_CUSval("highCam"),code=lnk_CUSrev("highCam")}, + WIDGET.newSwitch{name="nextPos", x=1190, y=480,disp=lnk_CUSval("nextPos"),code=lnk_CUSrev("nextPos")}, + WIDGET.newSwitch{name="bone", x=1190, y=550,disp=lnk_CUSval("bone"), code=lnk_CUSrev("bone")}, --Control - WIDGET.newSlider{name="nextCount", x=150,y=450,w=200,unit=6, disp=WIDGET.lnk_CUSval("nextCount"),code=WIDGET.lnk_CUSsto("nextCount")}, - WIDGET.newSlider{name="holdCount", x=150,y=520,w=200,unit=6, disp=WIDGET.lnk_CUSval("holdCount"),code=WIDGET.lnk_CUSsto("holdCount")}, - WIDGET.newSwitch{name="infHold", x=260,y=600, disp=WIDGET.lnk_CUSval("infHold"), code=WIDGET.lnk_CUSrev("infHold"),hide=function()return CUSTOMENV.holdCount==0 end}, + WIDGET.newSlider{name="nextCount", x=150,y=450,w=200,unit=6, disp=lnk_CUSval("nextCount"),code=lnk_CUSsto("nextCount")}, + WIDGET.newSlider{name="holdCount", x=150,y=520,w=200,unit=6, disp=lnk_CUSval("holdCount"),code=lnk_CUSsto("holdCount")}, + WIDGET.newSwitch{name="infHold", x=260,y=600, disp=lnk_CUSval("infHold"), code=lnk_CUSrev("infHold"),hide=function()return CUSTOMENV.holdCount==0 end}, - WIDGET.newSlider{name="mindas", x=180, y=150,w=400,unit=15,font=25,disp=WIDGET.lnk_CUSval("mindas"), code=WIDGET.lnk_CUSsto("mindas")}, - WIDGET.newSlider{name="minarr", x=180, y=220,w=400,unit=10,font=25,disp=WIDGET.lnk_CUSval("minarr"), code=WIDGET.lnk_CUSsto("minarr")}, - WIDGET.newSlider{name="minsdarr", x=180, y=290,w=200,unit=4, font=20,disp=WIDGET.lnk_CUSval("minsdarr"), code=WIDGET.lnk_CUSsto("minsdarr")}, + WIDGET.newSlider{name="mindas", x=180, y=150,w=400,unit=15,font=25,disp=lnk_CUSval("mindas"), code=lnk_CUSsto("mindas")}, + WIDGET.newSlider{name="minarr", x=180, y=220,w=400,unit=10,font=25,disp=lnk_CUSval("minarr"), code=lnk_CUSsto("minarr")}, + WIDGET.newSlider{name="minsdarr", x=180, y=290,w=200,unit=4, font=20,disp=lnk_CUSval("minsdarr"), code=lnk_CUSsto("minsdarr")}, --Rule - WIDGET.newSwitch{name="ospin", x=910, y=340, font=30,disp=WIDGET.lnk_CUSval("ospin"), code=WIDGET.lnk_CUSrev("ospin")}, - WIDGET.newSwitch{name="noTele", x=910, y=410, font=25,disp=WIDGET.lnk_CUSval("noTele"), code=WIDGET.lnk_CUSrev("noTele")}, - WIDGET.newSwitch{name="fineKill", x=910, y=480, font=20,disp=WIDGET.lnk_CUSval("fineKill"), code=WIDGET.lnk_CUSrev("fineKill")}, - WIDGET.newSwitch{name="b2bKill", x=910, y=550, font=20,disp=WIDGET.lnk_CUSval("b2bKill"), code=WIDGET.lnk_CUSrev("b2bKill")}, - WIDGET.newSwitch{name="easyFresh", x=910, y=620, font=20,disp=WIDGET.lnk_CUSval("easyFresh"),code=WIDGET.lnk_CUSrev("easyFresh")}, + WIDGET.newSwitch{name="ospin", x=910, y=340, font=30,disp=lnk_CUSval("ospin"), code=lnk_CUSrev("ospin")}, + WIDGET.newSwitch{name="noTele", x=910, y=410, font=25,disp=lnk_CUSval("noTele"), code=lnk_CUSrev("noTele")}, + WIDGET.newSwitch{name="fineKill", x=910, y=480, font=20,disp=lnk_CUSval("fineKill"), code=lnk_CUSrev("fineKill")}, + WIDGET.newSwitch{name="b2bKill", x=910, y=550, font=20,disp=lnk_CUSval("b2bKill"), code=lnk_CUSrev("b2bKill")}, + WIDGET.newSwitch{name="easyFresh", x=910, y=620, font=20,disp=lnk_CUSval("easyFresh"),code=lnk_CUSrev("easyFresh")}, - WIDGET.newSelector{name="RS", x=410, y=370, w=260,color="sea", list={"TRS","SRS","C2","C2sym","Classic","None"},disp=WIDGET.lnk_CUSval("RS"),code=WIDGET.lnk_CUSsto("RS")}, - WIDGET.newSelector{name="visible", x=840, y=60, w=260,color="lBlue",list={"show","time","fast","none"}, disp=WIDGET.lnk_CUSval("visible"), code=WIDGET.lnk_CUSsto("visible")}, - WIDGET.newSelector{name="target", x=840, y=160, w=260,color="green",list={10,20,40,100,200,500,1000,1e99}, disp=WIDGET.lnk_CUSval("target"), code=WIDGET.lnk_CUSsto("target")}, - WIDGET.newSelector{name="freshLimit",x=840, y=260, w=260,color="purple",list={0,8,15,1e99}, disp=WIDGET.lnk_CUSval("freshLimit"),code=WIDGET.lnk_CUSsto("freshLimit")}, - WIDGET.newSelector{name="opponent", x=1120, y=60, w=260,color="red", list={0,1,2,3,4,5,6,7,8,9,10}, disp=WIDGET.lnk_CUSval("opponent"),code=WIDGET.lnk_CUSsto("opponent")}, - WIDGET.newSelector{name="life", x=1120, y=160, w=260,color="red", list={0,1,2,3,5,10,15,26,42,87,500}, disp=WIDGET.lnk_CUSval("life"), code=WIDGET.lnk_CUSsto("life")}, - WIDGET.newSelector{name="pushSpeed",x=1120, y=260, w=260,color="red", list={1,2,3,5,15}, disp=WIDGET.lnk_CUSval("pushSpeed"),code=WIDGET.lnk_CUSsto("pushSpeed")}, + WIDGET.newSelector{name="RS", x=410, y=370, w=260,color="sea", list={"TRS","SRS","C2","C2sym","Classic","None"},disp=lnk_CUSval("RS"),code=lnk_CUSsto("RS")}, + WIDGET.newSelector{name="visible", x=840, y=60, w=260,color="lBlue",list={"show","time","fast","none"}, disp=lnk_CUSval("visible"), code=lnk_CUSsto("visible")}, + WIDGET.newSelector{name="target", x=840, y=160, w=260,color="green",list={10,20,40,100,200,500,1000,1e99}, disp=lnk_CUSval("target"), code=lnk_CUSsto("target")}, + WIDGET.newSelector{name="freshLimit",x=840, y=260, w=260,color="purple",list={0,8,15,1e99}, disp=lnk_CUSval("freshLimit"),code=lnk_CUSsto("freshLimit")}, + WIDGET.newSelector{name="opponent", x=1120, y=60, w=260,color="red", list={0,1,2,3,4,5,6,7,8,9,10}, disp=lnk_CUSval("opponent"),code=lnk_CUSsto("opponent")}, + WIDGET.newSelector{name="life", x=1120, y=160, w=260,color="red", list={0,1,2,3,5,10,15,26,42,87,500}, disp=lnk_CUSval("life"), code=lnk_CUSsto("life")}, + WIDGET.newSelector{name="pushSpeed",x=1120, y=260, w=260,color="red", list={1,2,3,5,15}, disp=lnk_CUSval("pushSpeed"),code=lnk_CUSsto("pushSpeed")}, - WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80, font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80, font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/custom_field.lua b/parts/scenes/custom_field.lua index c5baf90f..305ce3f4 100644 --- a/parts/scenes/custom_field.lua +++ b/parts/scenes/custom_field.lua @@ -276,20 +276,20 @@ scene.widgetList={ WIDGET.newButton{name="any", x=600, y=400,w=120,color="lGrey", font=40,code=setPen(0)}, WIDGET.newButton{name="space", x=730, y=400,w=120,color="grey", font=65,code=setPen(-1)}, - WIDGET.newButton{name="pushLine", x=990, y=400,w=120,h=120,color="lYellow",font=20,code=WIDGET.lnk_pressKey("k")}, - WIDGET.newButton{name="delLine", x=1120, y=400,w=120,h=120,color="lYellow",font=20,code=WIDGET.lnk_pressKey("l")}, + WIDGET.newButton{name="pushLine", x=990, y=400,w=120,h=120,color="lYellow",font=20,code=pressKey"k"}, + WIDGET.newButton{name="delLine", x=1120, y=400,w=120,h=120,color="lYellow",font=20,code=pressKey"l"}, - WIDGET.newButton{name="copy", x=730, y=530,w=120,color="lRed", font=35,code=WIDGET.lnk_pressKey("cC")}, - WIDGET.newButton{name="paste", x=860, y=530,w=120,color="lBlue", font=35,code=WIDGET.lnk_pressKey("cV")}, - WIDGET.newButton{name="clear", x=990, y=530,w=120,color="white", font=40,code=WIDGET.lnk_pressKey("delete")}, + WIDGET.newButton{name="copy", x=730, y=530,w=120,color="lRed", font=35,code=pressKey"cC"}, + WIDGET.newButton{name="paste", x=860, y=530,w=120,color="lBlue", font=35,code=pressKey"cV"}, + WIDGET.newButton{name="clear", x=990, y=530,w=120,color="white", font=40,code=pressKey"delete"}, WIDGET.newSwitch{name="demo", x=755, y=640,disp=function()return demo end,code=function()demo=not demo end}, - WIDGET.newButton{name="newPage", x=100, y=110,w=160,h=110,color="sky",font=20,code=WIDGET.lnk_pressKey("n")}, - WIDGET.newButton{name="delPage", x=100, y=230,w=160,h=110,color="lRed",font=20,code=WIDGET.lnk_pressKey("m")}, - WIDGET.newButton{name="prevPage", x=100, y=350,w=160,h=110,color="lGreen",font=20,code=WIDGET.lnk_pressKey("sTab"),hide=function()return page==1 end}, - WIDGET.newButton{name="nextPage", x=100, y=470,w=160,h=110,color="lGreen",font=20,code=WIDGET.lnk_pressKey("tab"),hide=function()return page==#FIELD end}, + WIDGET.newButton{name="newPage", x=100, y=110,w=160,h=110,color="sky",font=20,code=pressKey"n"}, + WIDGET.newButton{name="delPage", x=100, y=230,w=160,h=110,color="lRed",font=20,code=pressKey"m"}, + WIDGET.newButton{name="prevPage", x=100, y=350,w=160,h=110,color="lGreen",font=20,code=pressKey"sTab",hide=function()return page==1 end}, + WIDGET.newButton{name="nextPage", x=100, y=470,w=160,h=110,color="lGreen",font=20,code=pressKey"tab",hide=function()return page==#FIELD end}, - WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/custom_mission.lua b/parts/scenes/custom_mission.lua index a73c2248..b9a421a2 100644 --- a/parts/scenes/custom_mission.lua +++ b/parts/scenes/custom_mission.lua @@ -188,53 +188,53 @@ scene.widgetList={ WIDGET.newText{name="title", x=520,y=5,font=70,align="R"}, WIDGET.newText{name="subTitle", x=530,y=50,font=35,align="L",color="grey"}, - WIDGET.newKey{name="_1", x=800, y=540, w=90, font=50,code=WIDGET.lnk_pressKey(01)}, - WIDGET.newKey{name="_2", x=900, y=540, w=90, font=50,code=WIDGET.lnk_pressKey(02)}, - WIDGET.newKey{name="_3", x=800, y=640, w=90, font=50,code=WIDGET.lnk_pressKey(03)}, - WIDGET.newKey{name="_4", x=900, y=640, w=90, font=50,code=WIDGET.lnk_pressKey(04)}, - WIDGET.newKey{name="any1", x=100, y=640, w=90, code=WIDGET.lnk_pressKey(05)}, - WIDGET.newKey{name="any2", x=200, y=640, w=90, code=WIDGET.lnk_pressKey(06)}, - WIDGET.newKey{name="any3", x=300, y=640, w=90, code=WIDGET.lnk_pressKey(07)}, - WIDGET.newKey{name="any4", x=400, y=640, w=90, code=WIDGET.lnk_pressKey(08)}, - WIDGET.newKey{name="PC", x=500, y=640, w=90, font=50,code=WIDGET.lnk_pressKey(09)}, + WIDGET.newKey{name="_1", x=800, y=540, w=90, font=50,code=pressKey(01)}, + WIDGET.newKey{name="_2", x=900, y=540, w=90, font=50,code=pressKey(02)}, + WIDGET.newKey{name="_3", x=800, y=640, w=90, font=50,code=pressKey(03)}, + WIDGET.newKey{name="_4", x=900, y=640, w=90, font=50,code=pressKey(04)}, + WIDGET.newKey{name="any1", x=100, y=640, w=90, code=pressKey(05)}, + WIDGET.newKey{name="any2", x=200, y=640, w=90, code=pressKey(06)}, + WIDGET.newKey{name="any3", x=300, y=640, w=90, code=pressKey(07)}, + WIDGET.newKey{name="any4", x=400, y=640, w=90, code=pressKey(08)}, + WIDGET.newKey{name="PC", x=500, y=640, w=90, font=50,code=pressKey(09)}, - WIDGET.newKey{name="Z1", x=100, y=340, w=90, font=50,code=WIDGET.lnk_pressKey(11)}, - WIDGET.newKey{name="S1", x=200, y=340, w=90, font=50,code=WIDGET.lnk_pressKey(21)}, - WIDGET.newKey{name="J1", x=300, y=340, w=90, font=50,code=WIDGET.lnk_pressKey(31)}, - WIDGET.newKey{name="L1", x=400, y=340, w=90, font=50,code=WIDGET.lnk_pressKey(41)}, - WIDGET.newKey{name="T1", x=500, y=340, w=90, font=50,code=WIDGET.lnk_pressKey(51)}, - WIDGET.newKey{name="O1", x=600, y=340, w=90, font=50,code=WIDGET.lnk_pressKey(61)}, - WIDGET.newKey{name="I1", x=700, y=340, w=90, font=50,code=WIDGET.lnk_pressKey(71)}, + WIDGET.newKey{name="Z1", x=100, y=340, w=90, font=50,code=pressKey(11)}, + WIDGET.newKey{name="S1", x=200, y=340, w=90, font=50,code=pressKey(21)}, + WIDGET.newKey{name="J1", x=300, y=340, w=90, font=50,code=pressKey(31)}, + WIDGET.newKey{name="L1", x=400, y=340, w=90, font=50,code=pressKey(41)}, + WIDGET.newKey{name="T1", x=500, y=340, w=90, font=50,code=pressKey(51)}, + WIDGET.newKey{name="O1", x=600, y=340, w=90, font=50,code=pressKey(61)}, + WIDGET.newKey{name="I1", x=700, y=340, w=90, font=50,code=pressKey(71)}, - WIDGET.newKey{name="Z2", x=100, y=440, w=90, font=50,code=WIDGET.lnk_pressKey(12)}, - WIDGET.newKey{name="S2", x=200, y=440, w=90, font=50,code=WIDGET.lnk_pressKey(22)}, - WIDGET.newKey{name="J2", x=300, y=440, w=90, font=50,code=WIDGET.lnk_pressKey(32)}, - WIDGET.newKey{name="L2", x=400, y=440, w=90, font=50,code=WIDGET.lnk_pressKey(42)}, - WIDGET.newKey{name="T2", x=500, y=440, w=90, font=50,code=WIDGET.lnk_pressKey(52)}, - WIDGET.newKey{name="O2", x=600, y=440, w=90, font=50,code=WIDGET.lnk_pressKey(62)}, - WIDGET.newKey{name="I2", x=700, y=440, w=90, font=50,code=WIDGET.lnk_pressKey(72)}, + WIDGET.newKey{name="Z2", x=100, y=440, w=90, font=50,code=pressKey(12)}, + WIDGET.newKey{name="S2", x=200, y=440, w=90, font=50,code=pressKey(22)}, + WIDGET.newKey{name="J2", x=300, y=440, w=90, font=50,code=pressKey(32)}, + WIDGET.newKey{name="L2", x=400, y=440, w=90, font=50,code=pressKey(42)}, + WIDGET.newKey{name="T2", x=500, y=440, w=90, font=50,code=pressKey(52)}, + WIDGET.newKey{name="O2", x=600, y=440, w=90, font=50,code=pressKey(62)}, + WIDGET.newKey{name="I2", x=700, y=440, w=90, font=50,code=pressKey(72)}, - WIDGET.newKey{name="Z3", x=100, y=540, w=90, font=50,code=WIDGET.lnk_pressKey(13)}, - WIDGET.newKey{name="S3", x=200, y=540, w=90, font=50,code=WIDGET.lnk_pressKey(23)}, - WIDGET.newKey{name="J3", x=300, y=540, w=90, font=50,code=WIDGET.lnk_pressKey(33)}, - WIDGET.newKey{name="L3", x=400, y=540, w=90, font=50,code=WIDGET.lnk_pressKey(43)}, - WIDGET.newKey{name="T3", x=500, y=540, w=90, font=50,code=WIDGET.lnk_pressKey(53)}, - WIDGET.newKey{name="O3", x=600, y=540, w=90, font=50,code=WIDGET.lnk_pressKey(63)}, - WIDGET.newKey{name="I3", x=700, y=540, w=90, font=50,code=WIDGET.lnk_pressKey(73)}, + WIDGET.newKey{name="Z3", x=100, y=540, w=90, font=50,code=pressKey(13)}, + WIDGET.newKey{name="S3", x=200, y=540, w=90, font=50,code=pressKey(23)}, + WIDGET.newKey{name="J3", x=300, y=540, w=90, font=50,code=pressKey(33)}, + WIDGET.newKey{name="L3", x=400, y=540, w=90, font=50,code=pressKey(43)}, + WIDGET.newKey{name="T3", x=500, y=540, w=90, font=50,code=pressKey(53)}, + WIDGET.newKey{name="O3", x=600, y=540, w=90, font=50,code=pressKey(63)}, + WIDGET.newKey{name="I3", x=700, y=540, w=90, font=50,code=pressKey(73)}, - WIDGET.newKey{name="O4", x=600, y=640, w=90, font=50,code=WIDGET.lnk_pressKey(64)}, - WIDGET.newKey{name="I4", x=700, y=640, w=90, font=50,code=WIDGET.lnk_pressKey(74)}, + WIDGET.newKey{name="O4", x=600, y=640, w=90, font=50,code=pressKey(64)}, + WIDGET.newKey{name="I4", x=700, y=640, w=90, font=50,code=pressKey(74)}, - WIDGET.newKey{name="left", x=800, y=440, w=90, color="lGreen", font=55,code=WIDGET.lnk_pressKey("left")}, - WIDGET.newKey{name="right", x=900, y=440, w=90, color="lGreen", font=55,code=WIDGET.lnk_pressKey("right")}, - WIDGET.newKey{name="ten", x=1000, y=440, w=90, color="lGreen", font=40,code=WIDGET.lnk_pressKey("ten")}, - WIDGET.newKey{name="backsp", x=1000, y=540, w=90, color="lYellow",font=50,code=WIDGET.lnk_pressKey("backspace")}, - WIDGET.newKey{name="reset", x=1000, y=640, w=90, color="lYellow",font=50,code=WIDGET.lnk_pressKey("delete")}, - WIDGET.newButton{name="copy", x=1140, y=440, w=170,h=80, color="lRed", font=40,code=WIDGET.lnk_pressKey("cC"),hide=function()return #MISSION==0 end}, - WIDGET.newButton{name="paste", x=1140, y=540, w=170,h=80, color="lBlue", font=40,code=WIDGET.lnk_pressKey("cV")}, - WIDGET.newSwitch{name="mission",x=1150, y=350, disp=WIDGET.lnk_CUSval("missionKill"),code=WIDGET.lnk_CUSrev("missionKill")}, + WIDGET.newKey{name="left", x=800, y=440, w=90, color="lGreen", font=55,code=pressKey"left"}, + WIDGET.newKey{name="right", x=900, y=440, w=90, color="lGreen", font=55,code=pressKey"right"}, + WIDGET.newKey{name="ten", x=1000, y=440, w=90, color="lGreen", font=40,code=pressKey"ten"}, + WIDGET.newKey{name="backsp", x=1000, y=540, w=90, color="lYellow",font=50,code=pressKey"backspace"}, + WIDGET.newKey{name="reset", x=1000, y=640, w=90, color="lYellow",font=50,code=pressKey"delete"}, + WIDGET.newButton{name="copy", x=1140, y=440, w=170,h=80, color="lRed", font=40,code=pressKey"cC",hide=function()return #MISSION==0 end}, + WIDGET.newButton{name="paste", x=1140, y=540, w=170,h=80, color="lBlue", font=40,code=pressKey"cV"}, + WIDGET.newSwitch{name="mission",x=1150, y=350, disp=lnk_CUSval("missionKill"),code=lnk_CUSrev("missionKill")}, - WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80, font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80, font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/custom_sequence.lua b/parts/scenes/custom_sequence.lua index 1e9bd089..0417356f 100644 --- a/parts/scenes/custom_sequence.lua +++ b/parts/scenes/custom_sequence.lua @@ -191,52 +191,52 @@ scene.widgetList={ WIDGET.newSelector{name="sequence", x=1080,y=60,w=200,color="yellow", list={"bag","his4","rnd","reverb","loop","fixed"}, - disp=WIDGET.lnk_CUSval("sequence"), - code=WIDGET.lnk_CUSsto("sequence") + disp=lnk_CUSval("sequence"), + code=lnk_CUSsto("sequence") }, - WIDGET.newKey{name="Z", x=120,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(1)}, - WIDGET.newKey{name="S", x=200,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(2)}, - WIDGET.newKey{name="J", x=280,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(3)}, - WIDGET.newKey{name="L", x=360,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(4)}, - WIDGET.newKey{name="T", x=440,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(5)}, - WIDGET.newKey{name="O", x=520,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(6)}, - WIDGET.newKey{name="I", x=600,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(7)}, - WIDGET.newKey{name="left", x=680,y=460,w=80,color="lGreen",font=55,code=WIDGET.lnk_pressKey("left")}, - WIDGET.newKey{name="right", x=760,y=460,w=80,color="lGreen",font=55,code=WIDGET.lnk_pressKey("right")}, - WIDGET.newKey{name="ten", x=840,y=460,w=80,color="lGreen",font=40,code=WIDGET.lnk_pressKey("ten")}, - WIDGET.newKey{name="backsp",x=920,y=460,w=80,color="lYellow",font=50,code=WIDGET.lnk_pressKey("backspace")}, - WIDGET.newKey{name="reset", x=1000,y=460,w=80,color="lYellow",font=25,code=WIDGET.lnk_pressKey("delete")}, + WIDGET.newKey{name="Z", x=120,y=460,w=80,font=50,code=pressKey(1)}, + WIDGET.newKey{name="S", x=200,y=460,w=80,font=50,code=pressKey(2)}, + WIDGET.newKey{name="J", x=280,y=460,w=80,font=50,code=pressKey(3)}, + WIDGET.newKey{name="L", x=360,y=460,w=80,font=50,code=pressKey(4)}, + WIDGET.newKey{name="T", x=440,y=460,w=80,font=50,code=pressKey(5)}, + WIDGET.newKey{name="O", x=520,y=460,w=80,font=50,code=pressKey(6)}, + WIDGET.newKey{name="I", x=600,y=460,w=80,font=50,code=pressKey(7)}, + WIDGET.newKey{name="left", x=680,y=460,w=80,color="lGreen",font=55,code=pressKey"left"}, + WIDGET.newKey{name="right", x=760,y=460,w=80,color="lGreen",font=55,code=pressKey"right"}, + WIDGET.newKey{name="ten", x=840,y=460,w=80,color="lGreen",font=40,code=pressKey"ten"}, + WIDGET.newKey{name="backsp",x=920,y=460,w=80,color="lYellow",font=50,code=pressKey"backspace"}, + WIDGET.newKey{name="reset", x=1000,y=460,w=80,color="lYellow",font=25,code=pressKey"delete"}, - WIDGET.newKey{name="Z5", x=120,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(8)}, - WIDGET.newKey{name="S5", x=200,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(9)}, - WIDGET.newKey{name="P", x=280,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(10)}, - WIDGET.newKey{name="Q", x=360,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(11)}, - WIDGET.newKey{name="F", x=440,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(12)}, - WIDGET.newKey{name="E", x=520,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(13)}, - WIDGET.newKey{name="T5", x=600,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(14)}, - WIDGET.newKey{name="U", x=680,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(15)}, - WIDGET.newKey{name="V", x=760,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(16)}, - WIDGET.newKey{name="I3", x=840,y=540,w=80,color="grey",font=50,code=WIDGET.lnk_pressKey(26)}, - WIDGET.newKey{name="C", x=920,y=540,w=80,color="grey",font=50,code=WIDGET.lnk_pressKey(27)}, - WIDGET.newKey{name="rnd", x=1000,y=540,w=80,color="red",font=25,code=WIDGET.lnk_pressKey("=")}, + WIDGET.newKey{name="Z5", x=120,y=540,w=80,color="lGrey",font=50,code=pressKey(8)}, + WIDGET.newKey{name="S5", x=200,y=540,w=80,color="lGrey",font=50,code=pressKey(9)}, + WIDGET.newKey{name="P", x=280,y=540,w=80,color="lGrey",font=50,code=pressKey(10)}, + WIDGET.newKey{name="Q", x=360,y=540,w=80,color="lGrey",font=50,code=pressKey(11)}, + WIDGET.newKey{name="F", x=440,y=540,w=80,color="lGrey",font=50,code=pressKey(12)}, + WIDGET.newKey{name="E", x=520,y=540,w=80,color="lGrey",font=50,code=pressKey(13)}, + WIDGET.newKey{name="T5", x=600,y=540,w=80,color="lGrey",font=50,code=pressKey(14)}, + WIDGET.newKey{name="U", x=680,y=540,w=80,color="lGrey",font=50,code=pressKey(15)}, + WIDGET.newKey{name="V", x=760,y=540,w=80,color="lGrey",font=50,code=pressKey(16)}, + WIDGET.newKey{name="I3", x=840,y=540,w=80,color="grey",font=50,code=pressKey(26)}, + WIDGET.newKey{name="C", x=920,y=540,w=80,color="grey",font=50,code=pressKey(27)}, + WIDGET.newKey{name="rnd", x=1000,y=540,w=80,color="red",font=25,code=pressKey"="}, - WIDGET.newKey{name="W", x=120,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(17)}, - WIDGET.newKey{name="X", x=200,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(18)}, - WIDGET.newKey{name="J5", x=280,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(19)}, - WIDGET.newKey{name="L5", x=360,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(20)}, - WIDGET.newKey{name="R", x=440,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(21)}, - WIDGET.newKey{name="Y", x=520,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(22)}, - WIDGET.newKey{name="N", x=600,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(23)}, - WIDGET.newKey{name="H", x=680,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(24)}, - WIDGET.newKey{name="I5", x=760,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(25)}, - WIDGET.newKey{name="I2", x=840,y=620,w=80,color="dGrey",font=50,code=WIDGET.lnk_pressKey(28)}, - WIDGET.newKey{name="O1", x=920,y=620,w=80,color="dGrey",font=50,code=WIDGET.lnk_pressKey(29)}, + WIDGET.newKey{name="W", x=120,y=620,w=80,color="lGrey",font=50,code=pressKey(17)}, + WIDGET.newKey{name="X", x=200,y=620,w=80,color="lGrey",font=50,code=pressKey(18)}, + WIDGET.newKey{name="J5", x=280,y=620,w=80,color="lGrey",font=50,code=pressKey(19)}, + WIDGET.newKey{name="L5", x=360,y=620,w=80,color="lGrey",font=50,code=pressKey(20)}, + WIDGET.newKey{name="R", x=440,y=620,w=80,color="lGrey",font=50,code=pressKey(21)}, + WIDGET.newKey{name="Y", x=520,y=620,w=80,color="lGrey",font=50,code=pressKey(22)}, + WIDGET.newKey{name="N", x=600,y=620,w=80,color="lGrey",font=50,code=pressKey(23)}, + WIDGET.newKey{name="H", x=680,y=620,w=80,color="lGrey",font=50,code=pressKey(24)}, + WIDGET.newKey{name="I5", x=760,y=620,w=80,color="lGrey",font=50,code=pressKey(25)}, + WIDGET.newKey{name="I2", x=840,y=620,w=80,color="dGrey",font=50,code=pressKey(28)}, + WIDGET.newKey{name="O1", x=920,y=620,w=80,color="dGrey",font=50,code=pressKey(29)}, - WIDGET.newButton{name="copy", x=1140, y=460,w=170,h=80,color="lRed", font=40,code=WIDGET.lnk_pressKey("cC"),hide=function()return #BAG==0 end}, - WIDGET.newButton{name="paste", x=1140, y=550,w=170,h=80,color="lBlue", font=40,code=WIDGET.lnk_pressKey("cV")}, - WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80, font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="copy", x=1140, y=460,w=170,h=80,color="lRed", font=40,code=pressKey"cC",hide=function()return #BAG==0 end}, + WIDGET.newButton{name="paste", x=1140, y=550,w=170,h=80,color="lBlue", font=40,code=pressKey"cV"}, + WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80, font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/dict.lua b/parts/scenes/dict.lua index fd7f5784..49438219 100644 --- a/parts/scenes/dict.lua +++ b/parts/scenes/dict.lua @@ -39,12 +39,12 @@ local function clearResult() selected,scrollPos,waiting,lastSearch=1,0,0,false end local eggInput={ - ["15p"]="mg_15p", - sltg="mg_schulteG", - pong="mg_pong", - atoz="mg_AtoZ", - uttt="mg_UTTT", - cbf="mg_cubefield", + ["15p"]=goScene"mg_15p", + sltg=goScene"mg_schulteG", + pong=goScene"mg_pong", + atoz=goScene"mg_AtoZ", + uttt=goScene"mg_UTTT", + cbf=goScene"mg_cubefield", flag=function() BG.setDefault("none") BGM.setDefault(false) @@ -75,11 +75,7 @@ local eggInput={ }for k,v in next,eggInput do if type(v)=="string"then eggInput[k]=eggInput[v]end end local function search() if eggInput[input]then - if type(eggInput[input])=="string"then - SCN.go(eggInput[input]) - elseif type(eggInput[input])=="function"then - eggInput[input]() - end + eggInput[input]() else clearResult() local first @@ -220,10 +216,10 @@ end scene.widgetList={ WIDGET.newText{name="title", x=20, y=5,font=70,align="L"}, WIDGET.newKey{name="keyboard", x=960, y=60,w=200,h=80,font=35,code=function()love.keyboard.setTextInput(true,0,0,1,1)end,hide=not MOBILE}, - WIDGET.newKey{name="link", x=1140, y=650,w=200,h=80,font=35,code=WIDGET.lnk_pressKey("link"),hide=function()return not url end}, - WIDGET.newKey{name="up", x=1190, y=440,w=100,h=100,font=35,code=WIDGET.lnk_pressKey("up"),hide=not MOBILE}, - WIDGET.newKey{name="down", x=1190, y=550,w=100,h=100,font=35,code=WIDGET.lnk_pressKey("down"),hide=not MOBILE}, - WIDGET.newButton{name="back", x=1165, y=60,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newKey{name="link", x=1140, y=650,w=200,h=80,font=35,code=pressKey"link",hide=function()return not url end}, + WIDGET.newKey{name="up", x=1190, y=440,w=100,h=100,font=35,code=pressKey"up",hide=not MOBILE}, + WIDGET.newKey{name="down", x=1190, y=550,w=100,h=100,font=35,code=pressKey"down",hide=not MOBILE}, + WIDGET.newButton{name="back", x=1165, y=60,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/help.lua b/parts/scenes/help.lua index b92fd75c..9e13f34a 100644 --- a/parts/scenes/help.lua +++ b/parts/scenes/help.lua @@ -41,11 +41,11 @@ end scene.widgetList={ WIDGET.newImage{name="pay1", x=20, y=20}, WIDGET.newImage{name="pay2", x=1014, y=20}, - WIDGET.newButton{name="dict", x=1140, y=410,w=220,h=70,font=35,code=WIDGET.lnk_goScene("dict")}, - WIDGET.newButton{name="staff", x=1140, y=490,w=220,h=70,font=35,code=WIDGET.lnk_goScene("staff")}, - WIDGET.newButton{name="his", x=1140, y=570,w=220,h=70,font=35,code=WIDGET.lnk_goScene("history")}, + WIDGET.newButton{name="dict", x=1140, y=410,w=220,h=70,font=35,code=goScene"dict"}, + WIDGET.newButton{name="staff", x=1140, y=490,w=220,h=70,font=35,code=goScene"staff"}, + WIDGET.newButton{name="his", x=1140, y=570,w=220,h=70,font=35,code=goScene"history"}, WIDGET.newButton{name="qq", x=1140, y=650,w=220,h=70,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=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=640, y=600,w=170,h=80,font=35,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/history.lua b/parts/scenes/history.lua index 03ee65a7..97e72985 100644 --- a/parts/scenes/history.lua +++ b/parts/scenes/history.lua @@ -40,9 +40,9 @@ function scene.draw() end scene.widgetList={ - WIDGET.newKey{name="prev", x=1155, y=170,w=180,font=65,code=WIDGET.lnk_pressKey("up"),hide=function()return scrollPos==1 end}, - WIDGET.newKey{name="next", x=1155, y=400,w=180,font=65,code=WIDGET.lnk_pressKey("down"),hide=function()return scrollPos==#texts end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newKey{name="prev", x=1155, y=170,w=180,font=65,code=pressKey"up",hide=function()return scrollPos==1 end}, + WIDGET.newKey{name="next", x=1155, y=400,w=180,font=65,code=pressKey"down",hide=function()return scrollPos==#texts end}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/lang.lua b/parts/scenes/lang.lua index 5f4f679f..63f4ed63 100644 --- a/parts/scenes/lang.lua +++ b/parts/scenes/lang.lua @@ -14,7 +14,7 @@ scene.widgetList={ WIDGET.newButton{name="pt", x=200, y=250,w=200,h=120,font=35,code=setLang(6)}, WIDGET.newButton{name="symbol", x=420, y=250,w=200,h=120,font=35,code=setLang(7)}, WIDGET.newButton{name="yygq", x=640, y=250,w=200,h=120,font=35,code=setLang(8)}, - WIDGET.newButton{name="back", x=640, y=600,w=200,h=80,font=35,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=640, y=600,w=200,h=80,font=35,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/login.lua b/parts/scenes/login.lua index 27243514..830f3425 100644 --- a/parts/scenes/login.lua +++ b/parts/scenes/login.lua @@ -68,7 +68,7 @@ scene.widgetList={ WIDGET.newTextBox{name="email", x=380, y=200,w=500,h=60,regex="[0-9A-Za-z@._-]"}, WIDGET.newTextBox{name="password", x=380, y=300,w=626,h=60,secret=true,regex="[ -~]"}, WIDGET.newKey{name="login", x=1140, y=540,w=170,h=80,font=40,code=login}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index 39a94e79..052a061d 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -78,7 +78,7 @@ end scene.widgetList={ WIDGET.newText{name=SYSTEM, x=610,y=50,color="white",font=30,align="L",plain=true}, WIDGET.newText{name=VERSION_NAME,x=610,y=90,color="white",font=30,align="L",plain=true}, - WIDGET.newButton{name="offline",x=150,y=220,w=200,h=140,color="lRed", font=40,code=WIDGET.lnk_goScene("mode")}, + WIDGET.newButton{name="offline",x=150,y=220,w=200,h=140,color="lRed", font=40,code=goScene"mode"}, WIDGET.newButton{name="online", x=370,y=220,w=200,h=140,color="lCyan", font=40,code=function() if LOGIN then if USER.access_token then @@ -109,14 +109,14 @@ scene.widgetList={ end end}, WIDGET.newButton{name="qplay", x=590,y=220,w=200,h=140,color="lBlue", font=40,code=function()loadGame(STAT.lastPlay,true)end}, - WIDGET.newButton{name="setting",x=150,y=380,w=200,h=140,color="lOrange",font=40,code=WIDGET.lnk_goScene("setting_game")}, - WIDGET.newButton{name="stat", x=370,y=380,w=200,h=140,color="lGreen", font=40,code=WIDGET.lnk_goScene("stat")}, - WIDGET.newButton{name="custom", x=590,y=380,w=200,h=140,color="white", font=40,code=WIDGET.lnk_goScene("customGame")}, - WIDGET.newButton{name="lang", x=150,y=515,w=200,h=90,color="lYellow", font=40,code=WIDGET.lnk_goScene("lang")}, - WIDGET.newButton{name="help", x=370,y=515,w=200,h=90,color="dGreen", font=40,code=WIDGET.lnk_goScene("help")}, + WIDGET.newButton{name="setting",x=150,y=380,w=200,h=140,color="lOrange",font=40,code=goScene"setting_game"}, + WIDGET.newButton{name="stat", x=370,y=380,w=200,h=140,color="lGreen", font=40,code=goScene"stat"}, + WIDGET.newButton{name="custom", x=590,y=380,w=200,h=140,color="white", font=40,code=goScene"customGame"}, + WIDGET.newButton{name="lang", x=150,y=515,w=200,h=90,color="lYellow", font=40,code=goScene"lang"}, + WIDGET.newButton{name="help", x=370,y=515,w=200,h=90,color="dGreen", font=40,code=goScene"help"}, WIDGET.newButton{name="quit", x=590,y=515,w=200,h=90,color="grey", font=40,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end}, - WIDGET.newKey{name="music", x=150,y=610,w=200,h=60,color="red", code=WIDGET.lnk_goScene("music")}, - WIDGET.newKey{name="sound", x=590,y=610,w=200,h=60,color="grape", code=WIDGET.lnk_goScene("sound")}, + WIDGET.newKey{name="music", x=150,y=610,w=200,h=60,color="red", code=goScene"music"}, + WIDGET.newKey{name="sound", x=590,y=610,w=200,h=60,color="grape", code=goScene"sound"}, } return scene \ No newline at end of file diff --git a/parts/scenes/mg_15p.lua b/parts/scenes/mg_15p.lua index cf540723..3e0282e5 100644 --- a/parts/scenes/mg_15p.lua +++ b/parts/scenes/mg_15p.lua @@ -321,13 +321,13 @@ end local function Gaming()return state==1 end scene.widgetList={ - WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lGreen",font=40,code=WIDGET.lnk_pressKey("space")}, + WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lGreen",font=40,code=pressKey"space"}, WIDGET.newSlider{name="color", x=110,y=250,w=170,unit=4,show=false,font=30,disp=function()return color end, code=function(v)if state~=1 then color=v end end,hide=Gaming}, - WIDGET.newSwitch{name="blind", x=240,y=330,w=60, font=40,disp=function()return blind end, code=WIDGET.lnk_pressKey("w"), hide=Gaming}, - WIDGET.newSwitch{name="slide", x=240,y=420,w=60, font=40,disp=function()return slide end, code=WIDGET.lnk_pressKey("e"), hide=Gaming}, - WIDGET.newSwitch{name="pathVis",x=240,y=510,w=60, font=40,disp=function()return pathVis end, code=WIDGET.lnk_pressKey("r"), hide=function()return state==1 or not slide end}, - WIDGET.newSwitch{name="revKB", x=240,y=600,w=60, font=40,disp=function()return revKB end, code=WIDGET.lnk_pressKey("t"), hide=Gaming}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80, font=40,code=WIDGET.lnk_BACK}, + WIDGET.newSwitch{name="blind", x=240,y=330,w=60, font=40,disp=function()return blind end, code=pressKey"w", hide=Gaming}, + WIDGET.newSwitch{name="slide", x=240,y=420,w=60, font=40,disp=function()return slide end, code=pressKey"e", hide=Gaming}, + WIDGET.newSwitch{name="pathVis",x=240,y=510,w=60, font=40,disp=function()return pathVis end, code=pressKey"r", hide=function()return state==1 or not slide end}, + WIDGET.newSwitch{name="revKB", x=240,y=600,w=60, font=40,disp=function()return revKB end, code=pressKey"t", hide=Gaming}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80, font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/mg_AtoZ.lua b/parts/scenes/mg_AtoZ.lua index 7a0ef6f4..6f83eec0 100644 --- a/parts/scenes/mg_AtoZ.lua +++ b/parts/scenes/mg_AtoZ.lua @@ -121,9 +121,9 @@ end scene.widgetList={ WIDGET.newSelector{name="level", x=640,y=640,w=200,list={"A_Z","Z_A","Tech1","Tech2","KeyTest1","KeyTest2","Hello","Roll1","Roll2","Roll3","ZZZ","ZXZX","ZMZM","Stair","Stair2","Stair3","BPW"},disp=function()return levelName end,code=function(i)levelName=i;targetString=levels[i]end,hide=function()return state>0 end}, - WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lGreen",font=40,code=WIDGET.lnk_pressKey("space")}, + WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lGreen",font=40,code=pressKey"space"}, WIDGET.newButton{name="keyboard", x=160,y=210,w=180,h=100,code=function()love.keyboard.setTextInput(true,0,select(2,SCR.xOy:transformPoint(0,500)),1,1)end,hide=not MOBILE}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/mg_UTTT.lua b/parts/scenes/mg_UTTT.lua index 1991620d..efa229f3 100644 --- a/parts/scenes/mg_UTTT.lua +++ b/parts/scenes/mg_UTTT.lua @@ -236,7 +236,7 @@ end scene.widgetList={ WIDGET.newButton{name="reset",x=1140,y=540,w=170,h=80,font=40,color="lGreen",code=restart}, - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/mg_cubefield.lua b/parts/scenes/mg_cubefield.lua index 82498bb6..5f288c5e 100644 --- a/parts/scenes/mg_cubefield.lua +++ b/parts/scenes/mg_cubefield.lua @@ -298,7 +298,7 @@ function scene.draw() end scene.widgetList={ - WIDGET.newKey{name="back",x=1140,y=80,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newKey{name="back",x=1140,y=80,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/mg_pong.lua b/parts/scenes/mg_pong.lua index b844a175..6525c5c3 100644 --- a/parts/scenes/mg_pong.lua +++ b/parts/scenes/mg_pong.lua @@ -170,8 +170,8 @@ function scene.draw() end scene.widgetList={ - WIDGET.newKey{name="reset",x=640,y=45,w=150,h=50,font=35,code=WIDGET.lnk_pressKey("r")}, - WIDGET.newKey{name="back",x=640,y=675,w=150,h=50,font=35,code=WIDGET.lnk_BACK}, + WIDGET.newKey{name="reset",x=640,y=45,w=150,h=50,font=35,code=pressKey"r"}, + WIDGET.newKey{name="back",x=640,y=675,w=150,h=50,font=35,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/mg_schulteG.lua b/parts/scenes/mg_schulteG.lua index b8646d4b..fbc97747 100644 --- a/parts/scenes/mg_schulteG.lua +++ b/parts/scenes/mg_schulteG.lua @@ -173,12 +173,12 @@ function scene.draw() end scene.widgetList={ - WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lGreen",font=40,code=WIDGET.lnk_pressKey("space"),hide=function()return state==0 end}, + WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lGreen",font=40,code=pressKey"space",hide=function()return state==0 end}, WIDGET.newSlider{name="rank", x=130,y=250,w=150,unit=3,show=false,font=40,disp=function()return rank-3 end,code=function(v)rank=v+3 end,hide=function()return state>0 end}, - WIDGET.newSwitch{name="blind", x=240,y=330,w=60, font=40,disp=function()return blind end, code=WIDGET.lnk_pressKey("q"),hide=function()return state==1 end}, - WIDGET.newSwitch{name="disappear", x=240,y=420,w=60, font=40,disp=function()return disappear end,code=WIDGET.lnk_pressKey("w"),hide=function()return state==1 end}, - WIDGET.newSwitch{name="tapFX", x=240,y=510,w=60, font=40,disp=function()return tapFX end, code=WIDGET.lnk_pressKey("e"),hide=function()return state==1 end}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newSwitch{name="blind", x=240,y=330,w=60, font=40,disp=function()return blind end, code=pressKey"q",hide=function()return state==1 end}, + WIDGET.newSwitch{name="disappear", x=240,y=420,w=60, font=40,disp=function()return disappear end,code=pressKey"w",hide=function()return state==1 end}, + WIDGET.newSwitch{name="tapFX", x=240,y=510,w=60, font=40,disp=function()return tapFX end, code=pressKey"e",hide=function()return state==1 end}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/minigame.lua b/parts/scenes/minigame.lua index 68bb0f82..9350e8dc 100644 --- a/parts/scenes/minigame.lua +++ b/parts/scenes/minigame.lua @@ -5,13 +5,13 @@ function scene.sceneInit() end scene.widgetList={ - WIDGET.newButton{name="mg_15p", x=240, y=250,w=350,h=120,font=40,code=WIDGET.lnk_goScene("mg_15p")}, - WIDGET.newButton{name="mg_schulteG",x=640, y=250,w=350,h=120,font=40,code=WIDGET.lnk_goScene("mg_schulteG")}, - WIDGET.newButton{name="mg_pong", x=1040, y=250,w=350,h=120,font=40,code=WIDGET.lnk_goScene("mg_pong")}, - WIDGET.newButton{name="mg_AtoZ", x=240, y=400,w=350,h=120,font=40,code=WIDGET.lnk_goScene("mg_AtoZ")}, - WIDGET.newButton{name="mg_UTTT", x=640, y=400,w=350,h=120,font=30,code=WIDGET.lnk_goScene("mg_UTTT")}, - WIDGET.newButton{name="mg_cubefield",x=1040,y=400,w=350,h=120,font=40,code=WIDGET.lnk_goScene("mg_cubefield")}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="mg_15p", x=240, y=250,w=350,h=120,font=40,code=goScene"mg_15p"}, + WIDGET.newButton{name="mg_schulteG",x=640, y=250,w=350,h=120,font=40,code=goScene"mg_schulteG"}, + WIDGET.newButton{name="mg_pong", x=1040, y=250,w=350,h=120,font=40,code=goScene"mg_pong"}, + WIDGET.newButton{name="mg_AtoZ", x=240, y=400,w=350,h=120,font=40,code=goScene"mg_AtoZ"}, + WIDGET.newButton{name="mg_UTTT", x=640, y=400,w=350,h=120,font=30,code=goScene"mg_UTTT"}, + WIDGET.newButton{name="mg_cubefield",x=1040,y=400,w=350,h=120,font=40,code=goScene"mg_cubefield"}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/mod.lua b/parts/scenes/mod.lua index d499bade..a0f3e864 100644 --- a/parts/scenes/mod.lua +++ b/parts/scenes/mod.lua @@ -156,8 +156,8 @@ end scene.widgetList={ WIDGET.newText{name="title", x=80,y=50,font=70,align="L"}, WIDGET.newText{name="unranked", x=1200,y=60,color="yellow",font=50,align="R",hide=function()return scoreValid()end}, - WIDGET.newButton{name="reset", x=1140,y=540,w=170,h=80,font=25,code=WIDGET.lnk_pressKey("tab")}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="reset", x=1140,y=540,w=170,h=80,font=25,code=pressKey"tab"}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index d0a7cca7..cf0aeb29 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -307,9 +307,9 @@ function scene.draw() end scene.widgetList={ - WIDGET.newKey{name="mod", x=140,y=655,w=220,h=80,font=35,code=WIDGET.lnk_goScene("mod")}, - WIDGET.newButton{name="start", x=1040,y=655,w=180,h=80,font=40,code=WIDGET.lnk_pressKey("return"),hide=function()return not mapCam.sel end}, - WIDGET.newButton{name="back", x=1200,y=655,w=120,h=80,font=40,code=WIDGET.lnk_BACK}, + 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",hide=function()return not mapCam.sel end}, + WIDGET.newButton{name="back", x=1200,y=655,w=120,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/music.lua b/parts/scenes/music.lua index 5463c99c..1aeb4063 100644 --- a/parts/scenes/music.lua +++ b/parts/scenes/music.lua @@ -78,11 +78,11 @@ scene.widgetList={ WIDGET.newText{name="title", x=30, y=30,font=80,align="L"}, WIDGET.newText{name="arrow", x=270, y=360,font=45,align="L"}, WIDGET.newText{name="now", x=700, y=500,font=50,align="R",hide=function()return not BGM.nowPlay end}, - WIDGET.newSlider{name="bgm", x=760, y=80,w=400, font=35,disp=WIDGET.lnk_SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, - WIDGET.newButton{name="up", x=200, y=250,w=120, font=55,code=WIDGET.lnk_pressKey("up"),hide=function()return selected==1 end}, - WIDGET.newButton{name="play", x=200, y=390,w=120, font=35,code=WIDGET.lnk_pressKey("space")}, - WIDGET.newButton{name="down", x=200, y=530,w=120, font=55,code=WIDGET.lnk_pressKey("down"),hide=function()return selected==BGM.getCount()end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80, font=40,code=WIDGET.lnk_BACK}, + WIDGET.newSlider{name="bgm", x=760, y=80,w=400, font=35,disp=lnk_SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, + WIDGET.newButton{name="up", x=200, y=250,w=120, font=55,code=pressKey"up",hide=function()return selected==1 end}, + WIDGET.newButton{name="play", x=200, y=390,w=120, font=35,code=pressKey"space"}, + WIDGET.newButton{name="down", x=200, y=530,w=120, font=55,code=pressKey"down",hide=function()return selected==BGM.getCount()end}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80, font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/net_chat.lua b/parts/scenes/net_chat.lua index dbecbf15..3114db73 100644 --- a/parts/scenes/net_chat.lua +++ b/parts/scenes/net_chat.lua @@ -144,7 +144,7 @@ scene.widgetList={ WIDGET.newTextBox{name="text", x=40, y=500,w=980,h=180,font=40}, WIDGET.newButton{name="clear", x=1140, y=440,w=170,h=80,font=40,code=clearHistory,hide=function()return #texts<2 or newMessage end}, WIDGET.newButton{name="send", x=1140, y=540,w=170,h=80,font=40,code=sendMessage}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/net_game.lua b/parts/scenes/net_game.lua index 14cec980..5060c77e 100644 --- a/parts/scenes/net_game.lua +++ b/parts/scenes/net_game.lua @@ -314,7 +314,7 @@ function scene.draw() gc.pop() end scene.widgetList={ - WIDGET.newKey{name="quit",x=1235,y=45,w=80,font=25,code=WIDGET.lnk_pressKey("escape")}, + WIDGET.newKey{name="quit",x=1235,y=45,w=80,font=25,code=pressKey"escape"}, } return scene \ No newline at end of file diff --git a/parts/scenes/net_menu.lua b/parts/scenes/net_menu.lua index 66b0aa50..2534a485 100644 --- a/parts/scenes/net_menu.lua +++ b/parts/scenes/net_menu.lua @@ -28,14 +28,14 @@ end scene.widgetList={ WIDGET.newButton{name="ffa", x=640, y=200,w=350,h=120,font=40,code=NULL}, - WIDGET.newButton{name="rooms", x=640, y=360,w=350,h=120,font=40,code=WIDGET.lnk_goScene("net_rooms")}, + WIDGET.newButton{name="rooms", x=640, y=360,w=350,h=120,font=40,code=goScene"net_rooms"}, WIDGET.newButton{name="chat", x=640, y=540,w=350,h=120,font=40,code=function() wsConnect( tick_goChatRoom, PATH.socket..PATH.chat_room.."?email="..urlEncode(USER.email).."&access_token="..urlEncode(USER.access_token) ) end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/net_rooms.lua b/parts/scenes/net_rooms.lua index 121401c1..1c9f3dd0 100644 --- a/parts/scenes/net_rooms.lua +++ b/parts/scenes/net_rooms.lua @@ -149,9 +149,9 @@ end scene.widgetList={ WIDGET.newKey{name="fresh", x=440,y=620,w=140,h=140,font=40,code=fresh,hide=function()return TIME()-lastfreshTime<1 end}, - WIDGET.newKey{name="up", x=840,y=585,w=140,h=70,font=40,code=WIDGET.lnk_pressKey("up")}, - WIDGET.newKey{name="down", x=840,y=655,w=140,h=70,font=40,code=WIDGET.lnk_pressKey("down")}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newKey{name="up", x=840,y=585,w=140,h=70,font=40,code=pressKey"up"}, + WIDGET.newKey{name="down", x=840,y=655,w=140,h=70,font=40,code=pressKey"down"}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index 8ce74801..1fe00331 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -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 \ No newline at end of file diff --git a/parts/scenes/register.lua b/parts/scenes/register.lua index dec6e363..c7f80844 100644 --- a/parts/scenes/register.lua +++ b/parts/scenes/register.lua @@ -67,7 +67,7 @@ scene.widgetList={ WIDGET.newTextBox{name="email", x=380, y=300,w=626,h=60,regex="[0-9A-Za-z@._-]"}, WIDGET.newTextBox{name="password", x=380, y=400,w=626,h=60,secret=true,regex="[ -~]"}, WIDGET.newTextBox{name="password2", x=380, y=500,w=626,h=60,secret=true,regex="[ -~]"}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/savedata.lua b/parts/scenes/savedata.lua index 2b4ef4f1..7506bb39 100644 --- a/parts/scenes/savedata.lua +++ b/parts/scenes/savedata.lua @@ -111,7 +111,7 @@ scene.widgetList={ end, hide=HIDE}, - WIDGET.newButton{name="back", x=640,y=620,w=200,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=640,y=620,w=200,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_control.lua b/parts/scenes/setting_control.lua index 329f4f23..0e0ca29c 100644 --- a/parts/scenes/setting_control.lua +++ b/parts/scenes/setting_control.lua @@ -82,14 +82,14 @@ scene.widgetList={ WIDGET.newText{name="title", x=80, y=50,font=70,align="L"}, WIDGET.newText{name="preview", x=520, y=540,font=40,align="R"}, - WIDGET.newSlider{name="das", x=250, y=190,w=600,unit=20,disp=WIDGET.lnk_SETval("das"), show=sliderShow,code=WIDGET.lnk_SETsto("das")}, - WIDGET.newSlider{name="arr", x=250, y=260,w=525,unit=15,disp=WIDGET.lnk_SETval("arr"), show=sliderShow,code=WIDGET.lnk_SETsto("arr")}, - WIDGET.newSlider{name="sddas", x=250, y=330,w=350,unit=10,disp=WIDGET.lnk_SETval("sddas"),show=sliderShow,code=WIDGET.lnk_SETsto("sddas")}, - WIDGET.newSlider{name="sdarr", x=250, y=400,w=140,unit=4, disp=WIDGET.lnk_SETval("sdarr"),show=sliderShow,code=WIDGET.lnk_SETsto("sdarr")}, - WIDGET.newSlider{name="dascut", x=250, y=470,w=600,unit=20,disp=WIDGET.lnk_SETval("dascut"),show=sliderShow,code=WIDGET.lnk_SETsto("dascut")}, - WIDGET.newSwitch{name="ihs", x=1100, y=260, disp=WIDGET.lnk_SETval("ihs"), code=WIDGET.lnk_SETrev("ihs")}, - WIDGET.newSwitch{name="irs", x=1100, y=330, disp=WIDGET.lnk_SETval("irs"), code=WIDGET.lnk_SETrev("irs")}, - WIDGET.newSwitch{name="ims", x=1100, y=400, disp=WIDGET.lnk_SETval("ims"), code=WIDGET.lnk_SETrev("ims")}, + WIDGET.newSlider{name="das", x=250, y=190,w=600,unit=20,disp=lnk_SETval("das"), show=sliderShow,code=lnk_SETsto("das")}, + WIDGET.newSlider{name="arr", x=250, y=260,w=525,unit=15,disp=lnk_SETval("arr"), show=sliderShow,code=lnk_SETsto("arr")}, + WIDGET.newSlider{name="sddas", x=250, y=330,w=350,unit=10,disp=lnk_SETval("sddas"),show=sliderShow,code=lnk_SETsto("sddas")}, + WIDGET.newSlider{name="sdarr", x=250, y=400,w=140,unit=4, disp=lnk_SETval("sdarr"),show=sliderShow,code=lnk_SETsto("sdarr")}, + WIDGET.newSlider{name="dascut", x=250, y=470,w=600,unit=20,disp=lnk_SETval("dascut"),show=sliderShow,code=lnk_SETsto("dascut")}, + WIDGET.newSwitch{name="ihs", x=1100, y=260, disp=lnk_SETval("ihs"), code=lnk_SETrev("ihs")}, + WIDGET.newSwitch{name="irs", x=1100, y=330, disp=lnk_SETval("irs"), code=lnk_SETrev("irs")}, + WIDGET.newSwitch{name="ims", x=1100, y=400, disp=lnk_SETval("ims"), code=lnk_SETrev("ims")}, WIDGET.newButton{name="reset", x=160, y=580,w=200,h=100,color="lRed",font=40, code=function() local _=SETTING @@ -97,7 +97,7 @@ scene.widgetList={ _.sddas,_.sdarr=0,2 _.ihs,_.irs,_.ims=false,false,false end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_game.lua b/parts/scenes/setting_game.lua index 7de8d89a..27a579a2 100644 --- a/parts/scenes/setting_game.lua +++ b/parts/scenes/setting_game.lua @@ -18,21 +18,21 @@ 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="lCyan", font=35,code=WIDGET.lnk_swapScene("setting_video","swipeR")}, - WIDGET.newButton{name="sound", x=1080, y=80, w=240,h=80, color="lCyan", font=35,code=WIDGET.lnk_swapScene("setting_sound","swipeL")}, + WIDGET.newButton{name="graphic", x=200, y=80, w=240,h=80, color="lCyan", font=35,code=swapScene"setting_video","swipeR"}, + WIDGET.newButton{name="sound", x=1080, y=80, w=240,h=80, color="lCyan", font=35,code=swapScene"setting_sound","swipeL"}, - WIDGET.newButton{name="ctrl", x=290, y=220, w=320,h=80, color="lYellow",font=35,code=WIDGET.lnk_goScene("setting_control")}, - WIDGET.newButton{name="key", x=640, y=220, w=320,h=80, color="lGreen", font=35,code=WIDGET.lnk_goScene("setting_key")}, - WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80, color="lBlue", font=35,code=WIDGET.lnk_goScene("setting_touch")}, - WIDGET.newSlider{name="reTime", x=350, y=340, w=300,unit=10, font=30,disp=WIDGET.lnk_SETval("reTime"), code=WIDGET.lnk_SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end}, - WIDGET.newSelector{name="RS", x=500, y=420, w=300,color="sea",list={"TRS","SRS","C2","C2sym","Classic","None"},disp=WIDGET.lnk_SETval("RS"),code=WIDGET.lnk_SETsto("RS")}, - WIDGET.newButton{name="layout", x=580, y=540, w=200,h=70, font=35,code=WIDGET.lnk_goScene("setting_skin")}, - WIDGET.newSwitch{name="autoPause", x=1080, y=320, font=20,disp=WIDGET.lnk_SETval("autoPause"),code=WIDGET.lnk_SETrev("autoPause")}, - WIDGET.newSwitch{name="swap", x=1080, y=380, font=20,disp=WIDGET.lnk_SETval("swap"), code=WIDGET.lnk_SETrev("swap")}, - WIDGET.newSwitch{name="fine", x=1080, y=440, font=20,disp=WIDGET.lnk_SETval("fine"), code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play("finesseError",.6) end end}, - WIDGET.newSwitch{name="appLock", x=1080, y=500, font=20,disp=WIDGET.lnk_SETval("appLock"), code=WIDGET.lnk_SETrev("appLock")}, - WIDGET.newButton{name="calc", x=970, y=550, w=150,h=60,color="dGrey", font=25,code=WIDGET.lnk_goScene("calculator"),hide=function()return not SETTING.appLock end}, - WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80, font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="ctrl", x=290, y=220, w=320,h=80, color="lYellow",font=35,code=goScene"setting_control"}, + WIDGET.newButton{name="key", x=640, y=220, w=320,h=80, color="lGreen", font=35,code=goScene"setting_key"}, + WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80, color="lBlue", font=35,code=goScene"setting_touch"}, + WIDGET.newSlider{name="reTime", x=350, y=340, w=300,unit=10, font=30,disp=lnk_SETval("reTime"), code=lnk_SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end}, + WIDGET.newSelector{name="RS", x=500, y=420, w=300,color="sea",list={"TRS","SRS","C2","C2sym","Classic","None"},disp=lnk_SETval("RS"),code=lnk_SETsto("RS")}, + WIDGET.newButton{name="layout", x=580, y=540, w=200,h=70, font=35,code=goScene"setting_skin"}, + WIDGET.newSwitch{name="autoPause", x=1080, y=320, font=20,disp=lnk_SETval("autoPause"),code=lnk_SETrev("autoPause")}, + WIDGET.newSwitch{name="swap", x=1080, y=380, font=20,disp=lnk_SETval("swap"), code=lnk_SETrev("swap")}, + WIDGET.newSwitch{name="fine", x=1080, y=440, font=20,disp=lnk_SETval("fine"), code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play("finesseError",.6) end end}, + WIDGET.newSwitch{name="appLock", x=1080, y=500, font=20,disp=lnk_SETval("appLock"), code=lnk_SETrev("appLock")}, + WIDGET.newButton{name="calc", x=970, y=550, w=150,h=60,color="dGrey", font=25,code=goScene"calculator",hide=function()return not SETTING.appLock end}, + WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80, font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_key.lua b/parts/scenes/setting_key.lua index b8231b55..03638718 100644 --- a/parts/scenes/setting_key.lua +++ b/parts/scenes/setting_key.lua @@ -135,7 +135,7 @@ scene.widgetList={ WIDGET.newText{name="joystick", x=540,y=30,font=25,color="lBlue"}, WIDGET.newText{name="joystick", x=1140,y=30,font=25,color="lBlue"}, WIDGET.newText{name="help", x=50,y=650,font=30,align="L"}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_skin.lua b/parts/scenes/setting_skin.lua index 29800763..99f304c5 100644 --- a/parts/scenes/setting_skin.lua +++ b/parts/scenes/setting_skin.lua @@ -74,7 +74,7 @@ scene.widgetList={ end SFX.play("hold") end}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_sound.lua b/parts/scenes/setting_sound.lua index bd9e6c18..78184edd 100644 --- a/parts/scenes/setting_sound.lua +++ b/parts/scenes/setting_sound.lua @@ -58,18 +58,18 @@ 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="lCyan",font=35,code=WIDGET.lnk_swapScene("setting_game","swipeR")}, - WIDGET.newButton{name="graphic",x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=WIDGET.lnk_swapScene("setting_video","swipeL")}, + WIDGET.newButton{name="game", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene"setting_game","swipeR"}, + WIDGET.newButton{name="graphic",x=1080, y=80,w=240,h=80,color="lCyan",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=WIDGET.lnk_SETval("sfx"),code=WIDGET.lnk_SETsto("sfx")}, - WIDGET.newSlider{name="stereo", x=180, y=500,w=400, font=35,change=function()SFX.play("move",1,-1)SFX.play("lock",1,1)end,disp=WIDGET.lnk_SETval("stereo"),code=WIDGET.lnk_SETsto("stereo"),hide=function()return SETTING.sx==0 end}, - WIDGET.newSlider{name="spawn", x=180, y=300,w=400, font=30,change=function()SFX.fplay("spawn_"..math.random(7),SETTING.spawn)end,disp=WIDGET.lnk_SETval("spawn"),code=WIDGET.lnk_SETsto("spawn")}, - WIDGET.newSlider{name="bgm", x=180, y=400,w=400, font=35, disp=WIDGET.lnk_SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, - WIDGET.newSlider{name="vib", x=750, y=200,w=400,unit=5, font=25,change=function()VIB(2)end, disp=WIDGET.lnk_SETval("vib"),code=WIDGET.lnk_SETsto("vib")}, - WIDGET.newSlider{name="voc", x=750, y=300,w=400, font=35,change=function()VOC.play("test")end, disp=WIDGET.lnk_SETval("voc"),code=WIDGET.lnk_SETsto("voc")}, + WIDGET.newSlider{name="sfx", x=180, y=200,w=400, font=35,change=function()SFX.play("blip_1")end, disp=lnk_SETval("sfx"),code=lnk_SETsto("sfx")}, + WIDGET.newSlider{name="stereo", x=180, y=500,w=400, font=35,change=function()SFX.play("move",1,-1)SFX.play("lock",1,1)end,disp=lnk_SETval("stereo"),code=lnk_SETsto("stereo"),hide=function()return SETTING.sx==0 end}, + WIDGET.newSlider{name="spawn", x=180, y=300,w=400, font=30,change=function()SFX.fplay("spawn_"..math.random(7),SETTING.spawn)end,disp=lnk_SETval("spawn"),code=lnk_SETsto("spawn")}, + WIDGET.newSlider{name="bgm", x=180, y=400,w=400, font=35, disp=lnk_SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, + WIDGET.newSlider{name="vib", x=750, y=200,w=400,unit=5, font=25,change=function()VIB(2)end, disp=lnk_SETval("vib"),code=lnk_SETsto("vib")}, + WIDGET.newSlider{name="voc", x=750, y=300,w=400, font=35,change=function()VOC.play("test")end, disp=lnk_SETval("voc"),code=lnk_SETsto("voc")}, WIDGET.newSelector{name="cv", x=1100, y=380,w=200, list={"miya","naki"}, disp=function()return cv end,code=function(i)cv=i end}, WIDGET.newButton{name="apply", x=1100, y=460,w=180,h=80, code=function()SETTING.cv=cv VOC.loadAll()end,hide=function()return SETTING.cv==cv end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80, font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80, font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_touch.lua b/parts/scenes/setting_touch.lua index 33866d99..469d56db 100644 --- a/parts/scenes/setting_touch.lua +++ b/parts/scenes/setting_touch.lua @@ -198,7 +198,7 @@ scene.widgetList={ code=function() SCN.go("setting_touchSwitch") end}, - WIDGET.newButton{name="back", x=760,y=190,w=200,h=80,font=35,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=760,y=190,w=200,h=80,font=35,code=backScene}, WIDGET.newSlider{name="size", x=450,y=270,w=460,unit=19,font=40,show="vkSize", disp=function() return VK_org[selected].r/10-1 diff --git a/parts/scenes/setting_touchSwitch.lua b/parts/scenes/setting_touchSwitch.lua index 5a05410c..af5a6079 100644 --- a/parts/scenes/setting_touchSwitch.lua +++ b/parts/scenes/setting_touchSwitch.lua @@ -30,11 +30,11 @@ scene.widgetList={ WIDGET.newSwitch{name="b20", x=580, y=620, font=35,disp=VKAdisp(20),code=VKAcode(20)}, WIDGET.newButton{name="norm", x=840, y=100, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=i<11 end end}, WIDGET.newButton{name="pro", x=1120, y=100, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=true end end}, - WIDGET.newSwitch{name="hide", x=1170, y=200, font=40,disp=WIDGET.lnk_SETval("VKSwitch"),code=WIDGET.lnk_SETrev("VKSwitch")}, - WIDGET.newSwitch{name="track", x=1170, y=300, font=35,disp=WIDGET.lnk_SETval("VKTrack"),code=WIDGET.lnk_SETrev("VKTrack")}, - WIDGET.newSlider{name="sfx", x=800, y=380, w=180, font=35,change=function()SFX.play("virtualKey",SETTING.VKSFX)end,disp=WIDGET.lnk_SETval("VKSFX"),code=WIDGET.lnk_SETsto("VKSFX")}, - WIDGET.newSlider{name="vib", x=800, y=460, w=180,unit=2, font=35,change=function()VIB(SETTING.VKVIB)end,disp=WIDGET.lnk_SETval("VKVIB"),code=WIDGET.lnk_SETsto("VKVIB")}, - WIDGET.newSwitch{name="icon", x=850, y=300, font=40,disp=WIDGET.lnk_SETval("VKIcon"),code=WIDGET.lnk_SETrev("VKIcon")}, + WIDGET.newSwitch{name="hide", x=1170, y=200, font=40,disp=lnk_SETval("VKSwitch"),code=lnk_SETrev("VKSwitch")}, + WIDGET.newSwitch{name="track", x=1170, y=300, font=35,disp=lnk_SETval("VKTrack"),code=lnk_SETrev("VKTrack")}, + WIDGET.newSlider{name="sfx", x=800, y=380, w=180, font=35,change=function()SFX.play("virtualKey",SETTING.VKSFX)end,disp=lnk_SETval("VKSFX"),code=lnk_SETsto("VKSFX")}, + WIDGET.newSlider{name="vib", x=800, y=460, w=180,unit=2, font=35,change=function()VIB(SETTING.VKVIB)end,disp=lnk_SETval("VKVIB"),code=lnk_SETsto("VKVIB")}, + WIDGET.newSwitch{name="icon", x=850, y=300, font=40,disp=lnk_SETval("VKIcon"),code=lnk_SETrev("VKIcon")}, WIDGET.newButton{name="tkset", x=1120, y=420, w=240,h=80, code=function() SCN.go("setting_trackSetting") @@ -42,8 +42,8 @@ scene.widgetList={ hide=function() return not SETTING.VKTrack end}, - WIDGET.newSlider{name="alpha", x=840, y=540, w=400,font=40,disp=WIDGET.lnk_SETval("VKAlpha"),code=WIDGET.lnk_SETsto("VKAlpha")}, - WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newSlider{name="alpha", x=840, y=540, w=400,font=40,disp=lnk_SETval("VKAlpha"),code=lnk_SETsto("VKAlpha")}, + WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_trackSetting.lua b/parts/scenes/setting_trackSetting.lua index a7178491..85531473 100644 --- a/parts/scenes/setting_trackSetting.lua +++ b/parts/scenes/setting_trackSetting.lua @@ -11,10 +11,10 @@ function scene.draw() end scene.widgetList={ - WIDGET.newSwitch{name="VKDodge",x=400, y=530, font=35,disp=WIDGET.lnk_SETval("VKDodge"),code=WIDGET.lnk_SETrev("VKDodge")}, - WIDGET.newSlider{name="VKTchW", x=140, y=320,w=1000, font=35,disp=WIDGET.lnk_SETval("VKTchW"),code=function(i)SETTING.VKTchW=i SETTING.VKCurW=math.max(SETTING.VKCurW,i)end}, - WIDGET.newSlider{name="VKCurW", x=140, y=390,w=1000, font=35,disp=WIDGET.lnk_SETval("VKCurW"),code=function(i)SETTING.VKCurW=i SETTING.VKTchW=math.min(SETTING.VKTchW,i)end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newSwitch{name="VKDodge",x=400, y=530, font=35,disp=lnk_SETval("VKDodge"),code=lnk_SETrev("VKDodge")}, + WIDGET.newSlider{name="VKTchW", x=140, y=320,w=1000, font=35,disp=lnk_SETval("VKTchW"),code=function(i)SETTING.VKTchW=i SETTING.VKCurW=math.max(SETTING.VKCurW,i)end}, + WIDGET.newSlider{name="VKCurW", x=140, y=390,w=1000, font=35,disp=lnk_SETval("VKCurW"),code=function(i)SETTING.VKCurW=i SETTING.VKTchW=math.min(SETTING.VKTchW,i)end}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_video.lua b/parts/scenes/setting_video.lua index da6b9261..7245eb2b 100644 --- a/parts/scenes/setting_video.lua +++ b/parts/scenes/setting_video.lua @@ -10,24 +10,24 @@ 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="lCyan",font=35,code=WIDGET.lnk_swapScene("setting_sound","swipeR")}, - WIDGET.newButton{name="game", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=WIDGET.lnk_swapScene("setting_game","swipeL")}, + WIDGET.newButton{name="sound", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene"setting_sound","swipeR"}, + WIDGET.newButton{name="game", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene"setting_game","swipeL"}, - WIDGET.newSwitch{name="block", x=340, y=180, disp=WIDGET.lnk_SETval("block"), code=WIDGET.lnk_SETrev("block")}, - WIDGET.newSwitch{name="smooth", x=340, y=240, disp=WIDGET.lnk_SETval("smooth"), code=WIDGET.lnk_SETrev("smooth")}, - WIDGET.newSwitch{name="bagLine", x=340, y=300, disp=WIDGET.lnk_SETval("bagLine"), code=WIDGET.lnk_SETrev("bagLine")}, + WIDGET.newSwitch{name="block", x=340, y=180, disp=lnk_SETval("block"), code=lnk_SETrev("block")}, + WIDGET.newSwitch{name="smooth", x=340, y=240, disp=lnk_SETval("smooth"), code=lnk_SETrev("smooth")}, + WIDGET.newSwitch{name="bagLine", x=340, y=300, disp=lnk_SETval("bagLine"), code=lnk_SETrev("bagLine")}, - WIDGET.newSlider{name="ghost", x=630, y=180,w=200,unit=.6,disp=WIDGET.lnk_SETval("ghost"),show="percent", code=WIDGET.lnk_SETsto("ghost")}, - WIDGET.newSlider{name="grid", x=630, y=240,w=200,unit=.4,disp=WIDGET.lnk_SETval("grid"),show="percent", code=WIDGET.lnk_SETsto("grid")}, - WIDGET.newSlider{name="center", x=630, y=300,w=200,unit=1, disp=WIDGET.lnk_SETval("center"), code=WIDGET.lnk_SETsto("center")}, + WIDGET.newSlider{name="ghost", x=630, y=180,w=200,unit=.6,disp=lnk_SETval("ghost"),show="percent", code=lnk_SETsto("ghost")}, + WIDGET.newSlider{name="grid", x=630, y=240,w=200,unit=.4,disp=lnk_SETval("grid"),show="percent", code=lnk_SETsto("grid")}, + WIDGET.newSlider{name="center", x=630, y=300,w=200,unit=1, disp=lnk_SETval("center"), code=lnk_SETsto("center")}, - WIDGET.newSlider{name="lockFX", x=350, y=365,w=373,unit=5, disp=WIDGET.lnk_SETval("lockFX"), code=WIDGET.lnk_SETsto("lockFX")}, - WIDGET.newSlider{name="dropFX", x=350, y=410,w=373,unit=5, disp=WIDGET.lnk_SETval("dropFX"), code=WIDGET.lnk_SETsto("dropFX")}, - WIDGET.newSlider{name="moveFX", x=350, y=455,w=373,unit=5, disp=WIDGET.lnk_SETval("moveFX"), code=WIDGET.lnk_SETsto("moveFX")}, - WIDGET.newSlider{name="clearFX", x=350, y=500,w=373,unit=5, disp=WIDGET.lnk_SETval("clearFX"), code=WIDGET.lnk_SETsto("clearFX")}, - WIDGET.newSlider{name="splashFX", x=350, y=545,w=373,unit=5, disp=WIDGET.lnk_SETval("splashFX"), code=WIDGET.lnk_SETsto("splashFX")}, - WIDGET.newSlider{name="shakeFX", x=350, y=590,w=373,unit=5, disp=WIDGET.lnk_SETval("shakeFX"), code=WIDGET.lnk_SETsto("shakeFX")}, - WIDGET.newSlider{name="atkFX", x=350, y=635,w=373,unit=5, disp=WIDGET.lnk_SETval("atkFX"), code=WIDGET.lnk_SETsto("atkFX")}, + WIDGET.newSlider{name="lockFX", x=350, y=365,w=373,unit=5, disp=lnk_SETval("lockFX"), code=lnk_SETsto("lockFX")}, + WIDGET.newSlider{name="dropFX", x=350, y=410,w=373,unit=5, disp=lnk_SETval("dropFX"), code=lnk_SETsto("dropFX")}, + WIDGET.newSlider{name="moveFX", x=350, y=455,w=373,unit=5, disp=lnk_SETval("moveFX"), code=lnk_SETsto("moveFX")}, + WIDGET.newSlider{name="clearFX", x=350, y=500,w=373,unit=5, disp=lnk_SETval("clearFX"), code=lnk_SETsto("clearFX")}, + WIDGET.newSlider{name="splashFX", x=350, y=545,w=373,unit=5, disp=lnk_SETval("splashFX"), code=lnk_SETsto("splashFX")}, + WIDGET.newSlider{name="shakeFX", x=350, y=590,w=373,unit=5, disp=lnk_SETval("shakeFX"), code=lnk_SETsto("shakeFX")}, + WIDGET.newSlider{name="atkFX", x=350, y=635,w=373,unit=5, disp=lnk_SETval("atkFX"), code=lnk_SETsto("atkFX")}, WIDGET.newSlider{name="frame", x=350, y=680,w=373,unit=10, disp=function() return SETTING.frameMul>35 and SETTING.frameMul/10 or SETTING.frameMul/5-4 @@ -36,28 +36,28 @@ scene.widgetList={ SETTING.frameMul=i<5 and 5*i+20 or 10*i end}, - WIDGET.newSwitch{name="text", x=1100, y=180,font=35,disp=WIDGET.lnk_SETval("text"), code=WIDGET.lnk_SETrev("text")}, - WIDGET.newSwitch{name="score", x=1100, y=240,font=35,disp=WIDGET.lnk_SETval("score"), code=WIDGET.lnk_SETrev("score")}, - WIDGET.newSwitch{name="warn", x=1100, y=300,font=35,disp=WIDGET.lnk_SETval("warn"), code=WIDGET.lnk_SETrev("warn")}, - WIDGET.newSwitch{name="highCam", x=1100, y=360,font=35,disp=WIDGET.lnk_SETval("highCam"),code=WIDGET.lnk_SETrev("highCam")}, - WIDGET.newSwitch{name="nextPos", x=1100, y=420,font=35,disp=WIDGET.lnk_SETval("nextPos"),code=WIDGET.lnk_SETrev("nextPos")}, - WIDGET.newSwitch{name="fullscreen",x=1100, y=480,disp=WIDGET.lnk_SETval("fullscreen"), + WIDGET.newSwitch{name="text", x=1100, y=180,font=35,disp=lnk_SETval("text"), code=lnk_SETrev("text")}, + WIDGET.newSwitch{name="score", x=1100, y=240,font=35,disp=lnk_SETval("score"), code=lnk_SETrev("score")}, + WIDGET.newSwitch{name="warn", x=1100, y=300,font=35,disp=lnk_SETval("warn"), code=lnk_SETrev("warn")}, + WIDGET.newSwitch{name="highCam", x=1100, y=360,font=35,disp=lnk_SETval("highCam"),code=lnk_SETrev("highCam")}, + WIDGET.newSwitch{name="nextPos", x=1100, y=420,font=35,disp=lnk_SETval("nextPos"),code=lnk_SETrev("nextPos")}, + WIDGET.newSwitch{name="fullscreen",x=1100, y=480,disp=lnk_SETval("fullscreen"), code=function() SETTING.fullscreen=not SETTING.fullscreen love.window.setFullscreen(SETTING.fullscreen) love.resize(love.graphics.getWidth(),love.graphics.getHeight()) end}, - WIDGET.newSwitch{name="bg", x=1100, y=540,font=35,disp=WIDGET.lnk_SETval("bg"), + WIDGET.newSwitch{name="bg", x=1100, y=540,font=35,disp=lnk_SETval("bg"), code=function() BG.set("none") SETTING.bg=not SETTING.bg BG.set() end}, - WIDGET.newSwitch{name="power", x=990, y=640,font=35,disp=WIDGET.lnk_SETval("powerInfo"), + WIDGET.newSwitch{name="power", x=990, y=640,font=35,disp=lnk_SETval("powerInfo"), code=function() SETTING.powerInfo=not SETTING.powerInfo end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/sound.lua b/parts/scenes/sound.lua index 4cb5361a..47b42742 100644 --- a/parts/scenes/sound.lua +++ b/parts/scenes/sound.lua @@ -39,8 +39,8 @@ end scene.widgetList={ WIDGET.newText{name="title", x=30, y=15,font=70,align="L"}, - WIDGET.newSlider{name="sfx", x=510, y=60,w=330,font=35,change=function()SFX.play("blip_1")end,disp=WIDGET.lnk_SETval("sfx"),code=WIDGET.lnk_SETsto("sfx")}, - WIDGET.newSlider{name="voc", x=510, y=120,w=330,font=35,change=function()VOC.play("test")end,disp=WIDGET.lnk_SETval("voc"),code=WIDGET.lnk_SETsto("voc")}, + WIDGET.newSlider{name="sfx", x=510, y=60,w=330,font=35,change=function()SFX.play("blip_1")end,disp=lnk_SETval("sfx"),code=lnk_SETsto("sfx")}, + WIDGET.newSlider{name="voc", x=510, y=120,w=330,font=35,change=function()VOC.play("test")end,disp=lnk_SETval("voc"),code=lnk_SETsto("voc")}, WIDGET.newKey{name="move", x=110, y=140,w=160,h=50,font=20,code=function()SFX.play("move")end}, WIDGET.newKey{name="lock", x=110, y=205,w=160,h=50,font=20,code=function()SFX.play("lock")end}, @@ -62,49 +62,49 @@ scene.widgetList={ WIDGET.newKey{name="spin3", x=280, y=595,w=160,h=50,font=20,code=function()SFX.play("spin_3")end}, WIDGET.newKey{name="_pc", x=280, y=660,w=160,h=50,font=20,code=function()SFX.play("clear")end}, - WIDGET.newKey{name="_1", x=970, y=75,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(1)}, - WIDGET.newKey{name="_2", x=1130, y=75,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(2)}, - WIDGET.newKey{name="_3", x=970, y=140,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(3)}, - WIDGET.newKey{name="_4", x=1130, y=140,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(4)}, + WIDGET.newKey{name="_1", x=970, y=75,w=140,h=50,font=20,code=pressKey(1)}, + WIDGET.newKey{name="_2", x=1130, y=75,w=140,h=50,font=20,code=pressKey(2)}, + WIDGET.newKey{name="_3", x=970, y=140,w=140,h=50,font=20,code=pressKey(3)}, + WIDGET.newKey{name="_4", x=1130, y=140,w=140,h=50,font=20,code=pressKey(4)}, - WIDGET.newKey{name="z0", x=650, y=205,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(10)}, - WIDGET.newKey{name="z1", x=650, y=270,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(11)}, - WIDGET.newKey{name="z2", x=650, y=335,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(12)}, - WIDGET.newKey{name="z3", x=650, y=400,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(13)}, - WIDGET.newKey{name="t0", x=650, y=465,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(50)}, - WIDGET.newKey{name="t1", x=650, y=530,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(51)}, - WIDGET.newKey{name="t2", x=650, y=595,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(52)}, - WIDGET.newKey{name="t3", x=650, y=660,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(53)}, + WIDGET.newKey{name="z0", x=650, y=205,w=140,h=50,font=20,code=pressKey(10)}, + WIDGET.newKey{name="z1", x=650, y=270,w=140,h=50,font=20,code=pressKey(11)}, + WIDGET.newKey{name="z2", x=650, y=335,w=140,h=50,font=20,code=pressKey(12)}, + WIDGET.newKey{name="z3", x=650, y=400,w=140,h=50,font=20,code=pressKey(13)}, + WIDGET.newKey{name="t0", x=650, y=465,w=140,h=50,font=20,code=pressKey(50)}, + WIDGET.newKey{name="t1", x=650, y=530,w=140,h=50,font=20,code=pressKey(51)}, + WIDGET.newKey{name="t2", x=650, y=595,w=140,h=50,font=20,code=pressKey(52)}, + WIDGET.newKey{name="t3", x=650, y=660,w=140,h=50,font=20,code=pressKey(53)}, - WIDGET.newKey{name="s0", x=810, y=205,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(20)}, - WIDGET.newKey{name="s1", x=810, y=270,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(21)}, - WIDGET.newKey{name="s2", x=810, y=335,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(22)}, - WIDGET.newKey{name="s3", x=810, y=400,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(23)}, - WIDGET.newKey{name="o0", x=810, y=465,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(60)}, - WIDGET.newKey{name="o1", x=810, y=530,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(61)}, - WIDGET.newKey{name="o2", x=810, y=595,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(62)}, - WIDGET.newKey{name="o3", x=810, y=660,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(63)}, + WIDGET.newKey{name="s0", x=810, y=205,w=140,h=50,font=20,code=pressKey(20)}, + WIDGET.newKey{name="s1", x=810, y=270,w=140,h=50,font=20,code=pressKey(21)}, + WIDGET.newKey{name="s2", x=810, y=335,w=140,h=50,font=20,code=pressKey(22)}, + WIDGET.newKey{name="s3", x=810, y=400,w=140,h=50,font=20,code=pressKey(23)}, + WIDGET.newKey{name="o0", x=810, y=465,w=140,h=50,font=20,code=pressKey(60)}, + WIDGET.newKey{name="o1", x=810, y=530,w=140,h=50,font=20,code=pressKey(61)}, + WIDGET.newKey{name="o2", x=810, y=595,w=140,h=50,font=20,code=pressKey(62)}, + WIDGET.newKey{name="o3", x=810, y=660,w=140,h=50,font=20,code=pressKey(63)}, - WIDGET.newKey{name="j0", x=970, y=205,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(30)}, - WIDGET.newKey{name="j1", x=970, y=270,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(31)}, - WIDGET.newKey{name="j2", x=970, y=335,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(32)}, - WIDGET.newKey{name="j3", x=970, y=400,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(33)}, - WIDGET.newKey{name="i0", x=970, y=465,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(70)}, - WIDGET.newKey{name="i1", x=970, y=530,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(71)}, - WIDGET.newKey{name="i2", x=970, y=595,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(72)}, - WIDGET.newKey{name="i3", x=970, y=660,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(73)}, + WIDGET.newKey{name="j0", x=970, y=205,w=140,h=50,font=20,code=pressKey(30)}, + WIDGET.newKey{name="j1", x=970, y=270,w=140,h=50,font=20,code=pressKey(31)}, + WIDGET.newKey{name="j2", x=970, y=335,w=140,h=50,font=20,code=pressKey(32)}, + WIDGET.newKey{name="j3", x=970, y=400,w=140,h=50,font=20,code=pressKey(33)}, + WIDGET.newKey{name="i0", x=970, y=465,w=140,h=50,font=20,code=pressKey(70)}, + WIDGET.newKey{name="i1", x=970, y=530,w=140,h=50,font=20,code=pressKey(71)}, + WIDGET.newKey{name="i2", x=970, y=595,w=140,h=50,font=20,code=pressKey(72)}, + WIDGET.newKey{name="i3", x=970, y=660,w=140,h=50,font=20,code=pressKey(73)}, - WIDGET.newKey{name="l0", x=1130, y=205,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(40)}, - WIDGET.newKey{name="l1", x=1130, y=270,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(41)}, - WIDGET.newKey{name="l2", x=1130, y=335,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(42)}, - WIDGET.newKey{name="l3", x=1130, y=400,w=140,h=50,font=20,code=WIDGET.lnk_pressKey(43)}, + WIDGET.newKey{name="l0", x=1130, y=205,w=140,h=50,font=20,code=pressKey(40)}, + WIDGET.newKey{name="l1", x=1130, y=270,w=140,h=50,font=20,code=pressKey(41)}, + WIDGET.newKey{name="l2", x=1130, y=335,w=140,h=50,font=20,code=pressKey(42)}, + WIDGET.newKey{name="l3", x=1130, y=400,w=140,h=50,font=20,code=pressKey(43)}, - WIDGET.newSwitch{name="mini", x=515, y=465,font=25,disp=function()return mini end,code=WIDGET.lnk_pressKey("1")}, - WIDGET.newSwitch{name="b2b", x=515, y=530,font=25,disp=function()return b2b end,code=WIDGET.lnk_pressKey("2")}, - WIDGET.newSwitch{name="b3b", x=515, y=595,font=25,disp=function()return b3b end,code=WIDGET.lnk_pressKey("3")}, - WIDGET.newSwitch{name="pc", x=515, y=660,font=25,disp=function()return pc end,code=WIDGET.lnk_pressKey("4")}, + WIDGET.newSwitch{name="mini", x=515, y=465,font=25,disp=function()return mini end,code=pressKey"1"}, + WIDGET.newSwitch{name="b2b", x=515, y=530,font=25,disp=function()return b2b end,code=pressKey"2"}, + WIDGET.newSwitch{name="b3b", x=515, y=595,font=25,disp=function()return b3b end,code=pressKey"3"}, + WIDGET.newSwitch{name="pc", x=515, y=660,font=25,disp=function()return pc end,code=pressKey"4"}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/staff.lua b/parts/scenes/staff.lua index 7627eef7..838d155f 100644 --- a/parts/scenes/staff.lua +++ b/parts/scenes/staff.lua @@ -58,7 +58,7 @@ function scene.draw() end scene.widgetList={ - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,font=40,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/stat.lua b/parts/scenes/stat.lua index 94b54c5f..20008aa0 100644 --- a/parts/scenes/stat.lua +++ b/parts/scenes/stat.lua @@ -98,8 +98,8 @@ 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=WIDGET.lnk_goScene("savedata")}, - WIDGET.newButton{name="back",x=640,y=620,w=200,h=80,font=35,code=WIDGET.lnk_BACK}, + 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}, } return scene \ No newline at end of file