整理代码
新增没做完的公告页面 因为一些神秘token问题连接失败后会要求重新登录
This commit is contained in:
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