新增聊天测试场景
This commit is contained in:
15
parts/scenes/chat.lua
Normal file
15
parts/scenes/chat.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local function send()
|
||||
local W=WIDGET.active.text
|
||||
--sendMessage(W.value)
|
||||
W.value=""
|
||||
end
|
||||
|
||||
function sceneInit.chat()
|
||||
BG.set("none")
|
||||
end
|
||||
|
||||
WIDGET.init("chat",{
|
||||
WIDGET.newTextBox{name="text", x=40, y=500,w=980,h=180,font=40},
|
||||
WIDGET.newButton{name="send", x=1140, y=540,w=170,h=80,font=40,code=send},
|
||||
WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK},
|
||||
})
|
||||
@@ -35,7 +35,7 @@ end
|
||||
|
||||
WIDGET.init("main",{
|
||||
WIDGET.newButton{name="offline",x=150,y=220,w=200,h=140,color="lRed", font=40,code=WIDGET.lnk_goScene("mode")},
|
||||
WIDGET.newButton{name="online", x=370,y=220,w=200,h=140,color="lCyan", font=40,code=WIDGET.lnk_goScene(LOGIN and"netgame"or"login")},
|
||||
WIDGET.newButton{name="online", x=370,y=220,w=200,h=140,color="lCyan", font=40,code=function()SCN.go(LOGIN and"netgame"or"login")end},
|
||||
WIDGET.newButton{name="custom", x=590,y=220,w=200,h=140,color="lBlue", font=40,code=WIDGET.lnk_goScene("customGame")},
|
||||
WIDGET.newButton{name="setting",x=150,y=380,w=200,h=140,color="lOrange",font=40,code=WIDGET.lnk_goScene("setting_game")},
|
||||
WIDGET.newButton{name="stat", x=370,y=380,w=200,h=140,color="lGreen", font=40,code=WIDGET.lnk_goScene("stat")},
|
||||
|
||||
10
parts/scenes/netgame.lua
Normal file
10
parts/scenes/netgame.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
function sceneInit.netgame()
|
||||
BG.set("matrix")
|
||||
end
|
||||
|
||||
WIDGET.init("netgame",{
|
||||
WIDGET.newButton{name="ffa", x=640, y=200,w=350,h=120,font=40,code=NULL},
|
||||
WIDGET.newButton{name="rooms", x=640, y=360,w=350,h=120,font=40,code=NULL},
|
||||
WIDGET.newButton{name="chat", x=640, y=540,w=350,h=120,font=40,code=WIDGET.lnk_goScene("chat")},
|
||||
WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK},
|
||||
})
|
||||
Reference in New Issue
Block a user