主菜单布局再升级,一些文本重新等待翻译

This commit is contained in:
MrZ626
2021-03-26 10:07:04 +08:00
parent d735bcdc8b
commit d9dd692fa9
7 changed files with 88 additions and 91 deletions

View File

@@ -212,13 +212,13 @@ return{
group="Join our Discord: discord.gg/f9pUvkh",
WidgetText={
main={
offline="Single",
online="Multi",
qplay="Quick",
custom="Custom",
offline="Single Player",
qplay="Quick Play",
online="Multiplayer",
custom="Custom Game",
setting="Settings",
stat="Stats",
music="Music Room",
stat="Statistics",
music="Musics",
sound="SE Room",
help="Help",
lang="言/A",

View File

@@ -189,13 +189,13 @@ return{
group="Groupe QQ officiel (si non piraté) : 913154753",
WidgetText={
main={
offline="Solo",
online="Multi",
-- offline="Solo",
qplay="Partie rapide",
custom="Mode perso.",
-- online="Multi",
-- custom="Mode perso.",
setting="Paramètres",
stat="Statistiques",
music="Salon musical",
music="Musicologie",
sound="Salon SE",
help="Aide",
lang="言/A",

View File

@@ -213,8 +213,8 @@ return{
WidgetText={
main={
offline="Solo",
online="Multi",
qplay="Jogo R.",
online="Multi",
custom="Custom",
setting="Config.",
stat="Stats",

View File

@@ -192,9 +192,9 @@ return{
WidgetText={
main={
-- offline="Single",
-- online="Multi",
qplay="P. Rápida",
custom="Person.",
-- online="Multi",
-- custom="Person.",
setting="Opciones",
stat="Estadísticas",
music="Música",

View File

@@ -93,8 +93,8 @@ return{
WidgetText={
main={
offline="!",
online="!!!",
qplay="!",
online="!!!",
custom="_?!",
setting="_?_",
stat="=___",

View File

@@ -213,8 +213,8 @@ return{
WidgetText={
main={
offline="单机游戏",
online="联网游戏",
qplay="快速开始",
online="联网游戏",
custom="自定义",
setting="设置",
stat="统计信息",

View File

@@ -7,7 +7,7 @@ local scrollX
function scene.sceneInit()
tip:set(text.getTip())
scrollX=640
scrollX=1000
BG.set()
@@ -17,7 +17,7 @@ function scene.sceneInit()
GAME.frame=0
GAME.seed=math.random(2e6)
PLY.newDemoPlayer(1)
PLAYERS[1]:setPosition(900,30,1.1)
PLAYERS[1]:setPosition(560,50,.95)
end
function scene.keyDown(key)
@@ -25,70 +25,7 @@ function scene.keyDown(key)
loadGame(STAT.lastPlay,true)
elseif key=="p"then
SCN.go("mode")
elseif key=="escape"then
SCN.back()
elseif key=="application"then
SCN.go("dict")
elseif key=="f1"then
SCN.go("manual")
elseif key=="c"then
SCN.go("customGame")
elseif key=="s"then
SCN.go("setting_game")
else
WIDGET.keyPressed(key)
end
end
function scene.update(dt)
GAME.frame=GAME.frame+1
PLAYERS[1]:update(dt)
if GAME.frame>=36000 and GAME.frame%300==0 then
PLAYERS[1]:movePosition(math.random(800,1000),math.random(50,310),.6)
end
scrollX=scrollX-1.626
if scrollX<-tip:getWidth()then
scrollX=640
tip:set(text.getTip())
end
end
local function tipStencil()
gc.rectangle("fill",0,0,640,42)
end
function scene.draw()
gc.setColor(1,1,1)
--Title
gc.draw(TEXTURE.title_color,20,20,nil,.5)
--Quick play
setFont(30)
local L=text.modes[STAT.lastPlay]
gc.print(L[1],700,250)
gc.print(L[2],700,290)
--Tip
gc.push("transform")
gc.translate(50,660)
gc.setLineWidth(2)
gc.rectangle("line",0,0,640,42)
gc.stencil(tipStencil,"replace",1)
gc.setStencilTest("equal",1)
gc.draw(tip,0+scrollX,0)
gc.setColor(1,1,1,.2)
gc.setStencilTest()
gc.pop()
--Player
PLAYERS[1]:draw()
end
scene.widgetList={
WIDGET.newText{name="system", x=610,y=50,fText=SYSTEM, color="white",font=30,align="L"},
WIDGET.newText{name="version", x=610,y=90,fText=VERSION_NAME, color="white",font=30,align="L"},
WIDGET.newKey{name="offline", x=150,y=260,w=200,h=160,color="lRed", font=40,code=pressKey"p"},
WIDGET.newKey{name="online", x=370,y=260,w=200,h=160,color="lCyan", font=40,code=function()
elseif key=="m"then
if not LATEST_VERSION then
TEXT.show(text.notFinished,370,380,60,"flicker")
SFX.play("finesseError")
@@ -111,16 +48,76 @@ scene.widgetList={
else
SCN.go("login")
end
end},
WIDGET.newKey{name="qplay", x=590,y=260,w=200,h=160,color="lBlue", font=40,code=pressKey"q"},
WIDGET.newKey{name="custom", x=370,y=440,w=200,h=160,color="white", font=40,code=pressKey"c"},
WIDGET.newKey{name="setting", x=150,y=490,w=200,h=110,color="lOrange",font=40,code=pressKey"s"},
WIDGET.newKey{name="stat", x=590,y=490,w=200,h=110,color="lGreen", font=40,code=goScene"stat"},
WIDGET.newKey{name="music", x=150,y=600,w=200,h=60,color="red", code=goScene"music"},
WIDGET.newKey{name="sound", x=370,y=600,w=200,h=60,color="grape", code=goScene"sound"},
WIDGET.newKey{name="help", x=590,y=600,w=200,h=60,color="blue", code=goScene"help"},
WIDGET.newButton{name="lang", x=795,y=560,w=170,h=80,color="white", font=40,code=goScene"lang"},
WIDGET.newButton{name="quit", x=795,y=660,w=170,h=80,color="dGrey", font=40,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end},
elseif key=="escape"then
SCN.back()
elseif key=="application"then
SCN.go("dict")
elseif key=="f1"then
SCN.go("manual")
elseif key=="c"then
SCN.go("customGame")
elseif key=="s"then
SCN.go("setting_game")
else
WIDGET.keyPressed(key)
end
end
function scene.update(dt)
GAME.frame=GAME.frame+1
PLAYERS[1]:update(dt)
scrollX=scrollX-2.6
if scrollX<-tip:getWidth()then
scrollX=1000
tip:set(text.getTip())
end
end
local function tipStencil()
gc.rectangle("fill",0,0,1000,42)
end
function scene.draw()
gc.setColor(1,1,1)
--Title
gc.draw(TEXTURE.title_color,20,20,nil,.43)
--Quick play
setFont(30)
local L=text.modes[STAT.lastPlay]
gc.print(L[1],365,300)
gc.print(L[2],365,340)
--Tip
gc.push("transform")
gc.translate(40,650)
gc.setLineWidth(2)
gc.rectangle("line",0,0,1000,42)
gc.stencil(tipStencil,"replace",1)
gc.setStencilTest("equal",1)
gc.draw(tip,0+scrollX,0)
gc.setColor(1,1,1,.2)
gc.setStencilTest()
gc.pop()
--Player
PLAYERS[1]:draw()
end
scene.widgetList={
WIDGET.newText{name="system", x=1245,y=40,fText=SYSTEM, color="white", font=30,align="R"},
WIDGET.newText{name="version", x=1245,y=80,fText=VERSION_NAME, color="white", font=30,align="R"},
WIDGET.newButton{name="offline",x=50,y=210,w=600,h=100, color="lRed", font=45,align="R", code=pressKey"p"},
WIDGET.newButton{name="qplay", x=50,y=330,w=600,h=100, color="lCyan", font=45,align="R", code=pressKey"q"},
WIDGET.newButton{name="online", x=50,y=450,w=600,h=100, color="lBlue", font=45,align="R", code=pressKey"m"},
WIDGET.newButton{name="custom", x=50,y=570,w=600,h=100, color="white", font=45,align="R", code=pressKey"c"},
WIDGET.newButton{name="setting",x=1230,y=210,w=600,h=100, color="lYellow",font=40,align="L", code=pressKey"s"},
WIDGET.newButton{name="stat", x=1230,y=330,w=600,h=100, color="lOrange",font=40,align="L", code=goScene"stat"},
WIDGET.newButton{name="music", x=1290,y=450,w=480,h=100, color="grape", font=30,align="L", code=goScene"music"},
WIDGET.newButton{name="sound", x=1290,y=570,w=480,h=100, color="pink", font=30,align="L", code=goScene"sound"},
WIDGET.newButton{name="help", x=950,y=450,w=170,h=100, color="blue", font=35, code=goScene"help"},
WIDGET.newButton{name="lang", x=950,y=570,w=170,h=100, color="lCyan", font=40, code=goScene"lang"},
WIDGET.newButton{name="quit", x=1170,y=670,w=190,h=70, color="grey", font=40, code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end},
}
return scene