整理代码
新增没做完的公告页面 因为一些神秘token问题连接失败后会要求重新登录
This commit is contained in:
@@ -104,14 +104,19 @@ function scene.keyDown(key,isRep)
|
||||
end
|
||||
elseif key=='3' then
|
||||
if _testButton(10) then
|
||||
MES.new('warn',text.notFinished)
|
||||
-- NET.getNotice()
|
||||
end
|
||||
elseif key=='4' then
|
||||
if _testButton(11) then
|
||||
SCN.go('lang')
|
||||
end
|
||||
elseif key=='x' then
|
||||
if _testButton(11) then
|
||||
if _testButton(12) then
|
||||
SCN.go('about')
|
||||
end
|
||||
elseif key=='m' then
|
||||
if _testButton(12) then
|
||||
if _testButton(13) then
|
||||
SCN.go('manual')
|
||||
end
|
||||
elseif key=='c' then
|
||||
@@ -215,8 +220,9 @@ scene.widgetList={
|
||||
WIDGET.newButton{name='dict', x=2480,y=450,w=800,h=100, color='lG',font=40,align='L',edge=30,code=pressKey'l'},
|
||||
WIDGET.newButton{name='replays',x=2480,y=570,w=800,h=100, color='lC',font=40,align='L',edge=30,code=pressKey','},
|
||||
|
||||
WIDGET.newButton{name='music', x=120,y=80,w=100, color='lO',code=pressKey'2',font=70,fText=CHAR.icon.music},
|
||||
WIDGET.newButton{name='lang', x=280,y=80,w=100, color='lN',code=pressKey'3',font=70,fText=CHAR.icon.language},
|
||||
WIDGET.newButton{name='music', x=90,y=80,w=100, color='lY',code=pressKey'2',font=70,fText=CHAR.icon.music},
|
||||
WIDGET.newButton{name='notice', x=210,y=80,w=100, color='lA',code=pressKey'3',font=70,fText=CHAR.key.winMenu},
|
||||
WIDGET.newButton{name='lang', x=330,y=80,w=100, color='lN',code=pressKey'4',font=70,fText=CHAR.icon.language},
|
||||
WIDGET.newButton{name='about', x=-110,y=670,w=600,h=70, color='lB',align='R',edge=20,code=pressKey'x',font=50,fText=CHAR.icon.info},
|
||||
WIDGET.newButton{name='manual', x=1390,y=670,w=600,h=70, color='lR',align='L',edge=20,code=pressKey'm',font=50,fText=CHAR.icon.help},
|
||||
}
|
||||
|
||||
34
parts/scenes/notice.lua
Normal file
34
parts/scenes/notice.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
local scene={}
|
||||
|
||||
function scene.enter()
|
||||
BG.set('cubes')
|
||||
if type(SCN.args[1])=='string' then
|
||||
scene.widgetList.texts:setTexts(SCN.args[1])
|
||||
else
|
||||
scene.widgetList.texts:setTexts({"No data"})
|
||||
end
|
||||
end
|
||||
|
||||
function scene.wheelMoved(_,y)
|
||||
WHEELMOV(y)
|
||||
end
|
||||
function scene.keyDown(key)
|
||||
if key=='up' then
|
||||
scene.widgetList.texts:scroll(-5)
|
||||
elseif key=='down' then
|
||||
scene.widgetList.texts:scroll(5)
|
||||
elseif key=='pageup' then
|
||||
scene.widgetList.texts:scroll(-20)
|
||||
elseif key=='pagedown' then
|
||||
scene.widgetList.texts:scroll(20)
|
||||
elseif key=='escape' then
|
||||
SCN.back()
|
||||
end
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newTextBox{name='texts',x=30,y=45,w=1000,h=640,font=20,fix=true},
|
||||
WIDGET.newButton{name='back',x=1140,y=640,w=170,h=80,sound='back',font=60,fText=CHAR.icon.back,code=backScene},
|
||||
}
|
||||
|
||||
return scene
|
||||
Reference in New Issue
Block a user