优化用户名+id显示
This commit is contained in:
@@ -68,14 +68,14 @@ function scene.socketRead(mes)
|
||||
if cmd=="J"or cmd=="L"then
|
||||
textBox:push{
|
||||
COLOR.lR,args[1],
|
||||
COLOR.dY,args[2].." ",
|
||||
COLOR.dY,"#"..args[2].." ",
|
||||
COLOR.Y,text[cmd=="J"and"joinRoom"or"leaveRoom"]
|
||||
}
|
||||
remain=tonumber(args[3])
|
||||
elseif cmd=="T"then
|
||||
textBox:push{
|
||||
COLOR.W,args[1],
|
||||
COLOR.dY,args[2].." ",
|
||||
COLOR.dY,"#"..args[2].." ",
|
||||
data.decode("string","base64",COLOR.sky,args[3])
|
||||
}
|
||||
else
|
||||
|
||||
@@ -159,7 +159,7 @@ function scene.socketRead(mes)
|
||||
local L=splitStr(args[1],",")
|
||||
textBox:push{
|
||||
COLOR.lR,L[1],
|
||||
COLOR.dY,L[2].." ",
|
||||
COLOR.dY,"#"..L[2].." ",
|
||||
COLOR.Y,text.joinRoom,
|
||||
}
|
||||
end
|
||||
@@ -175,7 +175,7 @@ function scene.socketRead(mes)
|
||||
elseif cmd=="L"then
|
||||
textBox:push{
|
||||
COLOR.lR,args[1],
|
||||
COLOR.dY,args[2].." ",
|
||||
COLOR.dY,"#"..args[2].." ",
|
||||
COLOR.Y,text.leaveRoom,
|
||||
}
|
||||
for i=1,#playerData do
|
||||
@@ -200,7 +200,7 @@ function scene.socketRead(mes)
|
||||
elseif cmd=="T"then
|
||||
textBox:push{
|
||||
COLOR.W,args[1],
|
||||
COLOR.dY,args[2].." ",
|
||||
COLOR.dY,"#"..args[2].." ",
|
||||
data.decode("string","base64",COLOR.sky,args[3])
|
||||
}
|
||||
elseif cmd=="C"then
|
||||
@@ -332,7 +332,7 @@ function scene.draw()
|
||||
end
|
||||
scene.widgetList={
|
||||
textBox,
|
||||
WIDGET.newKey{name="ready",x=640,y=440,w=200,h=80,color="yellow",font=40,code=pressKey("space"),hide=function()return playing or PLAYERS[1].ready end},
|
||||
WIDGET.newKey{name="ready",x=640,y=440,w=200,h=80,color="yellow",font=40,code=pressKey("space"),hide=function()return playing or not hideChatBox or PLAYERS[1].ready end},
|
||||
WIDGET.newKey{name="hideChat",fText="...",x=410,y=40,w=60,font=35,code=switchChat},
|
||||
WIDGET.newKey{name="quit",fText="X",x=870,y=40,w=60,font=40,code=pressKey"escape"},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user