自定义游戏菜单调整,新增重置按钮
This commit is contained in:
@@ -193,8 +193,7 @@ USER=FILE.load("conf/user")or{--User infomation
|
||||
--Local data
|
||||
xp=0,lv=1,
|
||||
}
|
||||
CUSTOMENV=FILE.load("conf/customEnv")
|
||||
if not CUSTOMENV or CUSTOMENV.version~=VERSION.code then CUSTOMENV={--gameEnv for cutsom game
|
||||
customEnv0={
|
||||
version=VERSION.code,
|
||||
|
||||
--Basic
|
||||
@@ -233,7 +232,9 @@ if not CUSTOMENV or CUSTOMENV.version~=VERSION.code then CUSTOMENV={--gameEnv fo
|
||||
--Else
|
||||
bg="none",
|
||||
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
|
||||
--Tuning
|
||||
das=10,arr=2,dascut=0,
|
||||
|
||||
@@ -414,8 +414,9 @@ return{
|
||||
clear="Start-Clear",
|
||||
puzzle="Start-Puzzle",
|
||||
|
||||
reset="Reset (Del)",
|
||||
advance="More (A)",
|
||||
mod="Mods",
|
||||
mod="Mods (F1)",
|
||||
field="Edit Field (F)",
|
||||
sequence="Edit Sequence (S)",
|
||||
mission="Edit Mission (M)",
|
||||
|
||||
@@ -387,8 +387,9 @@ return{
|
||||
clear="Démarrer Clear",
|
||||
puzzle="Démarrer Puzzle",
|
||||
|
||||
-- reset="Reset (Del)",
|
||||
advance="Plus (A)",
|
||||
mod="Mods",
|
||||
mod="Mods (F1)",
|
||||
field="Modifier la matrice (F)",
|
||||
sequence="Modifier la séquence (S)",
|
||||
mission="Modifier la mission(M)",
|
||||
|
||||
@@ -415,8 +415,9 @@ return{
|
||||
clear="Iniciar-Limpar",
|
||||
puzzle="Iniciar-Puzzle",
|
||||
|
||||
-- reset="Reset (Del)",
|
||||
advance="Mais (A)",
|
||||
mod="Mods",
|
||||
mod="Mods (F1)",
|
||||
field="Editar Tab. (F)",
|
||||
sequence="Editar Sequência (S)",
|
||||
mission="Editar Missão (M)",
|
||||
|
||||
@@ -213,11 +213,11 @@ return{
|
||||
},
|
||||
pause={
|
||||
setting="Opciones (S)",
|
||||
replay= "Grabación (P)",
|
||||
replay="Grabación (P)",
|
||||
save="Guardar (O)",
|
||||
resume= "Resumir (esc)",
|
||||
resume="Resumir (esc)",
|
||||
restart="Reiniciar (R)",
|
||||
quit= "Finalizar (Q)",
|
||||
quit="Finalizar (Q)",
|
||||
},
|
||||
net_menu={
|
||||
ffa="FFA",
|
||||
@@ -388,8 +388,9 @@ return{
|
||||
clear="Inicio-Fin",
|
||||
puzzle="Inicio-Puzzle",
|
||||
|
||||
-- reset="Reset (Del)",
|
||||
advance="Más opciones (A)",
|
||||
mod="Mods",
|
||||
mod="Mods (F1)",
|
||||
field="Editar Tablero (F)",
|
||||
sequence="Editar Secuencia (S)",
|
||||
mission="Editar Misiones (M)",
|
||||
|
||||
@@ -233,9 +233,9 @@ return{
|
||||
size="←→",
|
||||
},
|
||||
setting_touchSwitch={
|
||||
b1= "←:", b2="→:", b3="R→:", b4="←R:",
|
||||
b5= "R↑↓:", b6="↓↓:", b7="↓:", b8="□←:",
|
||||
b9= "F1:", b10="F2:", b11="←←:", b12="→→:",
|
||||
b1="←:", b2="→:", b3="R→:", b4="←R:",
|
||||
b5="R↑↓:", b6="↓↓:", b7="↓:", b8="□←:",
|
||||
b9="F1:", b10="F2:", b11="←←:", b12="→→:",
|
||||
b13="↓_:", b14="↓1:", b15="↓4:", b16="↓10:",
|
||||
b17="←↓→↓:", b18="→↓↓:", b19="←↓→↓:",b20="→↓←↓:",
|
||||
norm="-",
|
||||
@@ -270,8 +270,9 @@ return{
|
||||
clear="Start-Clear",
|
||||
puzzle="Start-Puzzle",
|
||||
|
||||
reset="Reset (Del)",
|
||||
advance="More (A)",
|
||||
mod="?!?!?!",
|
||||
mod="?!?!?! (F1)",
|
||||
field="Edit Field (F)",
|
||||
sequence="Edit Sequence (S)",
|
||||
mission="Edit Mission (M)",
|
||||
|
||||
@@ -235,11 +235,11 @@ return{
|
||||
},
|
||||
pause={
|
||||
setting="设置(S)",
|
||||
replay= "回放(P)",
|
||||
replay="回放(P)",
|
||||
save="保存(O)",
|
||||
resume= "继续(esc)",
|
||||
resume="继续(esc)",
|
||||
restart="重新开始(R)",
|
||||
quit= "退出(Q)",
|
||||
quit="退出(Q)",
|
||||
},
|
||||
net_menu={
|
||||
ffa="FFA",
|
||||
@@ -413,8 +413,9 @@ return{
|
||||
clear="开始-消除",
|
||||
puzzle="开始-拼图",
|
||||
|
||||
reset="重置所有(Del)",
|
||||
advance="更多设置(A)",
|
||||
mod="Mods",
|
||||
mod="Mods (F1)",
|
||||
field="场地编辑(F)",
|
||||
sequence="序列编辑(S)",
|
||||
mission="任务编辑(M)",
|
||||
|
||||
@@ -78,7 +78,7 @@ return{
|
||||
spin7="转",
|
||||
},
|
||||
customGame={
|
||||
mod="模组",
|
||||
mod="模组(F1)",
|
||||
},
|
||||
custom_advance={
|
||||
nextCount="预览个数",
|
||||
|
||||
@@ -12,6 +12,7 @@ local CUSTOMENV=CUSTOMENV
|
||||
|
||||
local scene={}
|
||||
|
||||
local sure
|
||||
local initField
|
||||
local function freshMiniFieldVisible()
|
||||
initField=false
|
||||
@@ -23,6 +24,7 @@ local function freshMiniFieldVisible()
|
||||
end
|
||||
end
|
||||
function scene.sceneInit()
|
||||
sure=0
|
||||
destroyPlayers()
|
||||
BG.set(CUSTOMENV.bg)
|
||||
BGM.play(CUSTOMENV.bgm)
|
||||
@@ -61,8 +63,19 @@ function scene.keyDown(key)
|
||||
SCN.go("custom_sequence","swipeD")
|
||||
elseif key=="m"then
|
||||
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
|
||||
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
|
||||
local str="Techmino Quest:"..DATA.copyQuestArgs().."!"
|
||||
if #BAG>0 then str=str..DATA.copySequence()end
|
||||
@@ -96,6 +109,10 @@ function scene.keyDown(key)
|
||||
end
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
if sure>0 then sure=sure-1 end
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
--Field content
|
||||
if initField then
|
||||
@@ -143,6 +160,12 @@ function scene.draw()
|
||||
gc.print("#",610,545)
|
||||
gc.print(#MISSION,640,545)
|
||||
end
|
||||
|
||||
--Confirm reset
|
||||
if sure>0 then
|
||||
gc.setColor(1,1,1,sure*.02)
|
||||
gc.draw(drawableText.question,850,80)
|
||||
end
|
||||
end
|
||||
|
||||
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},
|
||||
|
||||
--More
|
||||
WIDGET.newKey{name="advance", x=730, y=190,w=220,h=90,color="R",font=35,code=goScene"custom_advance"},
|
||||
WIDGET.newKey{name="mod", x=730, y=310,w=220,h=90,color="Z",font=35,code=goScene"mod"},
|
||||
WIDGET.newKey{name="field", x=170, y=640,w=240,h=80,color="A",font=25,code=goScene"custom_field"},
|
||||
WIDGET.newKey{name="sequence", x=450, y=640,w=240,h=80,color="W",font=25,code=goScene"custom_sequence"},
|
||||
WIDGET.newKey{name="mission", x=730, y=640,w=240,h=80,color="N",font=25,code=goScene"custom_mission"},
|
||||
WIDGET.newKey{name="reset", x=730, y=150,w=220,h=90,color="R",font=30,code=pressKey"delete"},
|
||||
WIDGET.newKey{name="advance", x=730, y=270,w=220,h=90,color="F",font=35,code=pressKey"a"},
|
||||
WIDGET.newKey{name="mod", x=730, y=390,w=220,h=90,color="Z",font=35,code=pressKey"f1"},
|
||||
WIDGET.newKey{name="field", x=170, y=640,w=240,h=80,color="A",font=25,code=pressKey"f"},
|
||||
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"},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user