自定义游戏菜单调整,新增重置按钮
This commit is contained in:
@@ -193,8 +193,7 @@ USER=FILE.load("conf/user")or{--User infomation
|
|||||||
--Local data
|
--Local data
|
||||||
xp=0,lv=1,
|
xp=0,lv=1,
|
||||||
}
|
}
|
||||||
CUSTOMENV=FILE.load("conf/customEnv")
|
customEnv0={
|
||||||
if not CUSTOMENV or CUSTOMENV.version~=VERSION.code then CUSTOMENV={--gameEnv for cutsom game
|
|
||||||
version=VERSION.code,
|
version=VERSION.code,
|
||||||
|
|
||||||
--Basic
|
--Basic
|
||||||
@@ -233,7 +232,9 @@ if not CUSTOMENV or CUSTOMENV.version~=VERSION.code then CUSTOMENV={--gameEnv fo
|
|||||||
--Else
|
--Else
|
||||||
bg="none",
|
bg="none",
|
||||||
bgm="infinite",
|
bgm="infinite",
|
||||||
}end
|
}
|
||||||
|
CUSTOMENV=FILE.load("conf/customEnv")--gameEnv for cutsom game
|
||||||
|
if not CUSTOMENV or CUSTOMENV.version~=VERSION.code then CUSTOMENV=TABLE.copy(customEnv0)end
|
||||||
SETTING={--Settings
|
SETTING={--Settings
|
||||||
--Tuning
|
--Tuning
|
||||||
das=10,arr=2,dascut=0,
|
das=10,arr=2,dascut=0,
|
||||||
|
|||||||
@@ -414,8 +414,9 @@ return{
|
|||||||
clear="Start-Clear",
|
clear="Start-Clear",
|
||||||
puzzle="Start-Puzzle",
|
puzzle="Start-Puzzle",
|
||||||
|
|
||||||
|
reset="Reset (Del)",
|
||||||
advance="More (A)",
|
advance="More (A)",
|
||||||
mod="Mods",
|
mod="Mods (F1)",
|
||||||
field="Edit Field (F)",
|
field="Edit Field (F)",
|
||||||
sequence="Edit Sequence (S)",
|
sequence="Edit Sequence (S)",
|
||||||
mission="Edit Mission (M)",
|
mission="Edit Mission (M)",
|
||||||
|
|||||||
@@ -387,8 +387,9 @@ return{
|
|||||||
clear="Démarrer Clear",
|
clear="Démarrer Clear",
|
||||||
puzzle="Démarrer Puzzle",
|
puzzle="Démarrer Puzzle",
|
||||||
|
|
||||||
|
-- reset="Reset (Del)",
|
||||||
advance="Plus (A)",
|
advance="Plus (A)",
|
||||||
mod="Mods",
|
mod="Mods (F1)",
|
||||||
field="Modifier la matrice (F)",
|
field="Modifier la matrice (F)",
|
||||||
sequence="Modifier la séquence (S)",
|
sequence="Modifier la séquence (S)",
|
||||||
mission="Modifier la mission(M)",
|
mission="Modifier la mission(M)",
|
||||||
|
|||||||
@@ -415,8 +415,9 @@ return{
|
|||||||
clear="Iniciar-Limpar",
|
clear="Iniciar-Limpar",
|
||||||
puzzle="Iniciar-Puzzle",
|
puzzle="Iniciar-Puzzle",
|
||||||
|
|
||||||
|
-- reset="Reset (Del)",
|
||||||
advance="Mais (A)",
|
advance="Mais (A)",
|
||||||
mod="Mods",
|
mod="Mods (F1)",
|
||||||
field="Editar Tab. (F)",
|
field="Editar Tab. (F)",
|
||||||
sequence="Editar Sequência (S)",
|
sequence="Editar Sequência (S)",
|
||||||
mission="Editar Missão (M)",
|
mission="Editar Missão (M)",
|
||||||
|
|||||||
@@ -388,8 +388,9 @@ return{
|
|||||||
clear="Inicio-Fin",
|
clear="Inicio-Fin",
|
||||||
puzzle="Inicio-Puzzle",
|
puzzle="Inicio-Puzzle",
|
||||||
|
|
||||||
|
-- reset="Reset (Del)",
|
||||||
advance="Más opciones (A)",
|
advance="Más opciones (A)",
|
||||||
mod="Mods",
|
mod="Mods (F1)",
|
||||||
field="Editar Tablero (F)",
|
field="Editar Tablero (F)",
|
||||||
sequence="Editar Secuencia (S)",
|
sequence="Editar Secuencia (S)",
|
||||||
mission="Editar Misiones (M)",
|
mission="Editar Misiones (M)",
|
||||||
|
|||||||
@@ -270,8 +270,9 @@ return{
|
|||||||
clear="Start-Clear",
|
clear="Start-Clear",
|
||||||
puzzle="Start-Puzzle",
|
puzzle="Start-Puzzle",
|
||||||
|
|
||||||
|
reset="Reset (Del)",
|
||||||
advance="More (A)",
|
advance="More (A)",
|
||||||
mod="?!?!?!",
|
mod="?!?!?! (F1)",
|
||||||
field="Edit Field (F)",
|
field="Edit Field (F)",
|
||||||
sequence="Edit Sequence (S)",
|
sequence="Edit Sequence (S)",
|
||||||
mission="Edit Mission (M)",
|
mission="Edit Mission (M)",
|
||||||
|
|||||||
@@ -413,8 +413,9 @@ return{
|
|||||||
clear="开始-消除",
|
clear="开始-消除",
|
||||||
puzzle="开始-拼图",
|
puzzle="开始-拼图",
|
||||||
|
|
||||||
|
reset="重置所有(Del)",
|
||||||
advance="更多设置(A)",
|
advance="更多设置(A)",
|
||||||
mod="Mods",
|
mod="Mods (F1)",
|
||||||
field="场地编辑(F)",
|
field="场地编辑(F)",
|
||||||
sequence="序列编辑(S)",
|
sequence="序列编辑(S)",
|
||||||
mission="任务编辑(M)",
|
mission="任务编辑(M)",
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ return{
|
|||||||
spin7="转",
|
spin7="转",
|
||||||
},
|
},
|
||||||
customGame={
|
customGame={
|
||||||
mod="模组",
|
mod="模组(F1)",
|
||||||
},
|
},
|
||||||
custom_advance={
|
custom_advance={
|
||||||
nextCount="预览个数",
|
nextCount="预览个数",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ local CUSTOMENV=CUSTOMENV
|
|||||||
|
|
||||||
local scene={}
|
local scene={}
|
||||||
|
|
||||||
|
local sure
|
||||||
local initField
|
local initField
|
||||||
local function freshMiniFieldVisible()
|
local function freshMiniFieldVisible()
|
||||||
initField=false
|
initField=false
|
||||||
@@ -23,6 +24,7 @@ local function freshMiniFieldVisible()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function scene.sceneInit()
|
function scene.sceneInit()
|
||||||
|
sure=0
|
||||||
destroyPlayers()
|
destroyPlayers()
|
||||||
BG.set(CUSTOMENV.bg)
|
BG.set(CUSTOMENV.bg)
|
||||||
BGM.play(CUSTOMENV.bgm)
|
BGM.play(CUSTOMENV.bgm)
|
||||||
@@ -61,8 +63,19 @@ function scene.keyDown(key)
|
|||||||
SCN.go("custom_sequence","swipeD")
|
SCN.go("custom_sequence","swipeD")
|
||||||
elseif key=="m"then
|
elseif key=="m"then
|
||||||
SCN.go("custom_mission","swipeD")
|
SCN.go("custom_mission","swipeD")
|
||||||
|
elseif key=="delete"then
|
||||||
|
if sure>20 then
|
||||||
|
TABLE.update(customEnv0,CUSTOMENV)
|
||||||
|
for _,W in next,scene.widgetList do W:reset()end
|
||||||
|
sure=0
|
||||||
|
SFX.play("finesseError",.7)
|
||||||
|
else
|
||||||
|
sure=50
|
||||||
|
end
|
||||||
elseif key=="a"then
|
elseif key=="a"then
|
||||||
SCN.go("custom_advance","swipeD")
|
SCN.go("custom_advance","swipeD")
|
||||||
|
elseif key=="f1"then
|
||||||
|
SCN.go("mod","swipeD")
|
||||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||||
local str="Techmino Quest:"..DATA.copyQuestArgs().."!"
|
local str="Techmino Quest:"..DATA.copyQuestArgs().."!"
|
||||||
if #BAG>0 then str=str..DATA.copySequence()end
|
if #BAG>0 then str=str..DATA.copySequence()end
|
||||||
@@ -96,6 +109,10 @@ function scene.keyDown(key)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function scene.update()
|
||||||
|
if sure>0 then sure=sure-1 end
|
||||||
|
end
|
||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
--Field content
|
--Field content
|
||||||
if initField then
|
if initField then
|
||||||
@@ -143,6 +160,12 @@ function scene.draw()
|
|||||||
gc.print("#",610,545)
|
gc.print("#",610,545)
|
||||||
gc.print(#MISSION,640,545)
|
gc.print(#MISSION,640,545)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--Confirm reset
|
||||||
|
if sure>0 then
|
||||||
|
gc.setColor(1,1,1,sure*.02)
|
||||||
|
gc.draw(drawableText.question,850,80)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
scene.widgetList={
|
scene.widgetList={
|
||||||
@@ -168,11 +191,12 @@ scene.widgetList={
|
|||||||
WIDGET.newButton{name="puzzle", x=1070, y=550,w=310,h=70,color="lM",font=35,code=pressKey"return2",hide=function()return not initField end},
|
WIDGET.newButton{name="puzzle", x=1070, y=550,w=310,h=70,color="lM",font=35,code=pressKey"return2",hide=function()return not initField end},
|
||||||
|
|
||||||
--More
|
--More
|
||||||
WIDGET.newKey{name="advance", x=730, y=190,w=220,h=90,color="R",font=35,code=goScene"custom_advance"},
|
WIDGET.newKey{name="reset", x=730, y=150,w=220,h=90,color="R",font=30,code=pressKey"delete"},
|
||||||
WIDGET.newKey{name="mod", x=730, y=310,w=220,h=90,color="Z",font=35,code=goScene"mod"},
|
WIDGET.newKey{name="advance", x=730, y=270,w=220,h=90,color="F",font=35,code=pressKey"a"},
|
||||||
WIDGET.newKey{name="field", x=170, y=640,w=240,h=80,color="A",font=25,code=goScene"custom_field"},
|
WIDGET.newKey{name="mod", x=730, y=390,w=220,h=90,color="Z",font=35,code=pressKey"f1"},
|
||||||
WIDGET.newKey{name="sequence", x=450, y=640,w=240,h=80,color="W",font=25,code=goScene"custom_sequence"},
|
WIDGET.newKey{name="field", x=170, y=640,w=240,h=80,color="A",font=25,code=pressKey"f"},
|
||||||
WIDGET.newKey{name="mission", x=730, y=640,w=240,h=80,color="N",font=25,code=goScene"custom_mission"},
|
WIDGET.newKey{name="sequence", x=450, y=640,w=240,h=80,color="W",font=25,code=pressKey"s"},
|
||||||
|
WIDGET.newKey{name="mission", x=730, y=640,w=240,h=80,color="N",font=25,code=pressKey"m"},
|
||||||
|
|
||||||
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=pressKey"escape"},
|
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=pressKey"escape"},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user