添加legals页面
This commit is contained in:
@@ -60,9 +60,10 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newImage{name="pay1", x=20, y=20,hide=SYSTEM=='iOS'},
|
||||
WIDGET.newImage{name="pay2", x=1014,y=20,hide=SYSTEM=='iOS'},
|
||||
WIDGET.newButton{name="staff", x=1140,y=400,w=220,h=80,font=35,code=goScene'staff'},
|
||||
WIDGET.newButton{name="his", x=1140,y=500,w=220,h=80,font=35,code=goScene'history'},
|
||||
WIDGET.newButton{name="qq", x=1140,y=600,w=220,h=80,font=35,code=function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,hide=MOBILE},
|
||||
WIDGET.newButton{name="staff", x=1140,y=380,w=220,h=80,font=35,code=goScene'staff'},
|
||||
WIDGET.newButton{name="his", x=1140,y=470,w=220,h=80,font=35,code=goScene'history'},
|
||||
WIDGET.newButton{name="legals", x=1140,y=560,w=220,h=80,font=35,code=goScene'legals'},
|
||||
WIDGET.newButton{name="qq", x=1140,y=650,w=220,h=80,font=35,code=function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,hide=MOBILE},
|
||||
WIDGET.newButton{name="back", x=640, y=600,w=170,h=80,font=60,fText=CHAR.icon.back,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
29
parts/scenes/legals.lua
Normal file
29
parts/scenes/legals.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
local scene={}
|
||||
function scene.sceneInit()
|
||||
BG.set('cubes')
|
||||
WIDGET.active.texts:setTexts(STRING.split(love.filesystem.read("legals.md"),'\n'))
|
||||
end
|
||||
|
||||
function scene.wheelMoved(_,y)
|
||||
WHEELMOV(y)
|
||||
end
|
||||
function scene.keyDown(key)
|
||||
if key=="up"then
|
||||
WIDGET.active.texts:scroll(-5)
|
||||
elseif key=="down"then
|
||||
WIDGET.active.texts:scroll(5)
|
||||
elseif key=="pageup"then
|
||||
WIDGET.active.texts:scroll(-20)
|
||||
elseif key=="pagedown"then
|
||||
WIDGET.active.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=15,fix=true},
|
||||
WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,font=60,fText=CHAR.icon.back,code=backScene},
|
||||
}
|
||||
|
||||
return scene
|
||||
Reference in New Issue
Block a user