添加游戏中菜单按钮位置设定
This commit is contained in:
@@ -250,6 +250,7 @@ SETTING={--Settings
|
|||||||
--System
|
--System
|
||||||
reTime=4,
|
reTime=4,
|
||||||
autoPause=true,
|
autoPause=true,
|
||||||
|
menuPos='right',
|
||||||
fine=false,
|
fine=false,
|
||||||
simpMode=false,
|
simpMode=false,
|
||||||
lang=1,
|
lang=1,
|
||||||
|
|||||||
@@ -312,6 +312,7 @@ return{
|
|||||||
RS="Rotation System",
|
RS="Rotation System",
|
||||||
layout="Layout",
|
layout="Layout",
|
||||||
autoPause="Pause while unfocused",
|
autoPause="Pause while unfocused",
|
||||||
|
menuPos="Menu button pos.",
|
||||||
swap="Key Combination (Change Atk. Mode)",
|
swap="Key Combination (Change Atk. Mode)",
|
||||||
simpMode="Simplistic Style",
|
simpMode="Simplistic Style",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -278,6 +278,7 @@ return{
|
|||||||
RS="Sistema de Rotación",
|
RS="Sistema de Rotación",
|
||||||
layout="Diseño",
|
layout="Diseño",
|
||||||
autoPause="Pausar cuando la ventana no está enfocada",
|
autoPause="Pausar cuando la ventana no está enfocada",
|
||||||
|
-- menuPos="Menu button pos.",
|
||||||
swap="Combinación de Teclas (Cambiar Modo de Ataque)",
|
swap="Combinación de Teclas (Cambiar Modo de Ataque)",
|
||||||
simpMode="Modo Sencillo",
|
simpMode="Modo Sencillo",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -275,6 +275,7 @@ return{
|
|||||||
RS="Système de rotation",
|
RS="Système de rotation",
|
||||||
layout="Disposition",
|
layout="Disposition",
|
||||||
autoPause="Mettre en pause en cas de perte de focus",
|
autoPause="Mettre en pause en cas de perte de focus",
|
||||||
|
-- menuPos="Menu button pos.",
|
||||||
swap="Combinaison de touches (changer le mode d'attaque)",
|
swap="Combinaison de touches (changer le mode d'attaque)",
|
||||||
-- simpMode="Simple mode",
|
-- simpMode="Simple mode",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -302,6 +302,7 @@ return{
|
|||||||
RS="Sistema de rotação",
|
RS="Sistema de rotação",
|
||||||
layout="Layout",
|
layout="Layout",
|
||||||
autoPause="Pausar quando foco for perco",
|
autoPause="Pausar quando foco for perco",
|
||||||
|
-- menuPos="Menu button pos.",
|
||||||
swap="Combinação de tecla(Mudar modo de atk)",
|
swap="Combinação de tecla(Mudar modo de atk)",
|
||||||
-- simpMode="Simple mode",
|
-- simpMode="Simple mode",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ return{
|
|||||||
RS="''?",
|
RS="''?",
|
||||||
layout="=-=-=",
|
layout="=-=-=",
|
||||||
autoPause="A||",
|
autoPause="A||",
|
||||||
|
menuPos="←M→?",
|
||||||
swap="=+=+=",
|
swap="=+=+=",
|
||||||
simpMode=".",
|
simpMode=".",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -312,6 +312,7 @@ return{
|
|||||||
RS="旋转系统",
|
RS="旋转系统",
|
||||||
layout="外观",
|
layout="外观",
|
||||||
autoPause="失去焦点自动暂停",
|
autoPause="失去焦点自动暂停",
|
||||||
|
menuPos="菜单按钮位置",
|
||||||
swap="组合键切换攻击模式",
|
swap="组合键切换攻击模式",
|
||||||
simpMode="简洁模式",
|
simpMode="简洁模式",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ local GAME=GAME
|
|||||||
local noTouch,noKey=false,false
|
local noTouch,noKey=false,false
|
||||||
local touchMoveLastFrame=false
|
local touchMoveLastFrame=false
|
||||||
local floatRepRate,replayRate
|
local floatRepRate,replayRate
|
||||||
|
local modeTextPos
|
||||||
|
|
||||||
local replaying
|
local replaying
|
||||||
local repRateStrings={[0]="pause",[.125]="0.125x",[.5]="0.5x",[1]="1x",[2]="2x",[5]="5x"}
|
local repRateStrings={[0]="pause",[.125]="0.125x",[.5]="0.5x",[1]="1x",[2]="2x",[5]="5x"}
|
||||||
@@ -69,6 +70,9 @@ local function _step()floatRepRate=floatRepRate+1 end
|
|||||||
|
|
||||||
|
|
||||||
function scene.sceneInit(org)
|
function scene.sceneInit(org)
|
||||||
|
noKey=replaying
|
||||||
|
noTouch=not SETTING.VKSwitch or noKey
|
||||||
|
|
||||||
if GAME.init then
|
if GAME.init then
|
||||||
resetGameData()
|
resetGameData()
|
||||||
GAME.init=false
|
GAME.init=false
|
||||||
@@ -79,10 +83,20 @@ function scene.sceneInit(org)
|
|||||||
floatRepRate,replayRate=0,1
|
floatRepRate,replayRate=0,1
|
||||||
end
|
end
|
||||||
updateRepButtons()
|
updateRepButtons()
|
||||||
|
|
||||||
noKey=replaying
|
|
||||||
noTouch=not SETTING.VKSwitch or noKey
|
|
||||||
WIDGET.active.restart.hide=replaying
|
WIDGET.active.restart.hide=replaying
|
||||||
|
if SETTING.menuPos=='right'then
|
||||||
|
WIDGET.active.restart.x=1125
|
||||||
|
WIDGET.active.pause.x=1195
|
||||||
|
modeTextPos=1100-drawableText.modeName:getWidth()
|
||||||
|
elseif SETTING.menuPos=='middle'then
|
||||||
|
WIDGET.active.restart.x=360
|
||||||
|
WIDGET.active.pause.x=860
|
||||||
|
modeTextPos=940
|
||||||
|
elseif SETTING.menuPos=='left'then
|
||||||
|
WIDGET.active.restart.x=120
|
||||||
|
WIDGET.active.pause.x=190
|
||||||
|
modeTextPos=1200-drawableText.modeName:getWidth()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function scene.sceneBack()
|
function scene.sceneBack()
|
||||||
destroyPlayers()
|
destroyPlayers()
|
||||||
@@ -303,7 +317,7 @@ function scene.draw()
|
|||||||
|
|
||||||
--Mode info
|
--Mode info
|
||||||
gc.setColor(1,1,1,.8)
|
gc.setColor(1,1,1,.8)
|
||||||
gc.draw(drawableText.modeName,1120-drawableText.modeName:getWidth(),10)
|
gc.draw(drawableText.modeName,modeTextPos,10)
|
||||||
|
|
||||||
--Replaying
|
--Replaying
|
||||||
if replaying then
|
if replaying then
|
||||||
@@ -326,8 +340,8 @@ scene.widgetList={
|
|||||||
WIDGET.newKey{name="rep2", x=300,y=50,w=60,code=_rep2,fText=TEXTURE.rep.rep2},
|
WIDGET.newKey{name="rep2", x=300,y=50,w=60,code=_rep2,fText=TEXTURE.rep.rep2},
|
||||||
WIDGET.newKey{name="rep5", x=365,y=50,w=60,code=_rep5,fText=TEXTURE.rep.rep5},
|
WIDGET.newKey{name="rep5", x=365,y=50,w=60,code=_rep5,fText=TEXTURE.rep.rep5},
|
||||||
WIDGET.newKey{name="step", x=430,y=50,w=60,code=_step,fText=TEXTURE.rep.step},
|
WIDGET.newKey{name="step", x=430,y=50,w=60,code=_step,fText=TEXTURE.rep.step},
|
||||||
WIDGET.newKey{name="restart", x=1165,y=45,w=60,code=restart,fText=TEXTURE.game.restart},
|
WIDGET.newKey{name="restart", x=0,y=45,w=60,code=restart,fText=TEXTURE.game.restart},
|
||||||
WIDGET.newKey{name="pause", x=1235,y=45,w=60,code=pauseGame,fText=TEXTURE.game.pause},
|
WIDGET.newKey{name="pause", x=0,y=45,w=60,code=pauseGame,fText=TEXTURE.game.pause},
|
||||||
}
|
}
|
||||||
|
|
||||||
return scene
|
return scene
|
||||||
@@ -31,8 +31,9 @@ scene.widgetList={
|
|||||||
WIDGET.newSlider{name="reTime", x=330, y=320, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end},
|
WIDGET.newSlider{name="reTime", x=330, y=320, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end},
|
||||||
WIDGET.newSelector{name="RS", x=300, y=420, w=300,color='S',list={'TRS','SRS','BiRS','ASC','ASC_plus','C2','C2_sym','Classic','Classic_plus','None','None_plus'},disp=SETval("RS"),code=SETsto("RS")},
|
WIDGET.newSelector{name="RS", x=300, y=420, w=300,color='S',list={'TRS','SRS','BiRS','ASC','ASC_plus','C2','C2_sym','Classic','Classic_plus','None','None_plus'},disp=SETval("RS"),code=SETsto("RS")},
|
||||||
WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene'setting_skin'},
|
WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene'setting_skin'},
|
||||||
WIDGET.newSwitch{name="autoPause", x=1060, y=350, disp=SETval("autoPause"), code=SETrev("autoPause")},
|
WIDGET.newSwitch{name="autoPause", x=1060, y=320, disp=SETval("autoPause"), code=SETrev("autoPause")},
|
||||||
WIDGET.newSwitch{name="swap", x=1060, y=460, disp=SETval("swap"), code=SETrev("swap")},
|
WIDGET.newSelector{name="menuPos", x=980, y=420, w=300,color='O',list={'left','middle','right'},disp=SETval("menuPos"),code=SETsto("menuPos")},
|
||||||
|
WIDGET.newSwitch{name="swap", x=1060, y=520, disp=SETval("swap"), code=SETrev("swap")},
|
||||||
WIDGET.newSwitch{name="simpMode", x=1060, y=800, disp=SETval("simpMode"),
|
WIDGET.newSwitch{name="simpMode", x=1060, y=800, disp=SETval("simpMode"),
|
||||||
code=function()
|
code=function()
|
||||||
SETTING.simpMode=not SETTING.simpMode
|
SETTING.simpMode=not SETTING.simpMode
|
||||||
|
|||||||
Reference in New Issue
Block a user