微调网战ui聊天框相关
This commit is contained in:
@@ -24,8 +24,8 @@ local function onVirtualkey(x,y)
|
|||||||
return nearest
|
return nearest
|
||||||
end
|
end
|
||||||
|
|
||||||
local hideChatBox=false
|
local hideChatBox
|
||||||
local textBox=WIDGET.newTextBox{name="texts",x=300,y=80,w=680,h=620,hide=function()return hideChatBox end}
|
local textBox=WIDGET.newTextBox{name="texts",x=340,y=80,w=600,h=550,hide=function()return hideChatBox end}
|
||||||
|
|
||||||
local playing
|
local playing
|
||||||
local lastBackTime=0
|
local lastBackTime=0
|
||||||
@@ -42,6 +42,7 @@ end
|
|||||||
function scene.sceneInit()
|
function scene.sceneInit()
|
||||||
love.keyboard.setKeyRepeat(false)
|
love.keyboard.setKeyRepeat(false)
|
||||||
TASK.new(TICK_wsRead)
|
TASK.new(TICK_wsRead)
|
||||||
|
hideChatBox=true
|
||||||
textBox:clear()
|
textBox:clear()
|
||||||
|
|
||||||
playerData={}
|
playerData={}
|
||||||
@@ -367,10 +368,17 @@ function scene.draw()
|
|||||||
gc.setShader()
|
gc.setShader()
|
||||||
end
|
end
|
||||||
gc.pop()
|
gc.pop()
|
||||||
|
|
||||||
|
--New message
|
||||||
|
if textBox.new and hideChatBox then
|
||||||
|
setFont(30)
|
||||||
|
gc.setColor(1,TIME()%.4<.2 and 1 or 0,0)
|
||||||
|
gc.print("M",460,15)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
scene.widgetList={
|
scene.widgetList={
|
||||||
textBox,
|
textBox,
|
||||||
WIDGET.newKey{name="hideChat",fText="[..]",x=410,y=40,w=60,font=35,code=function()hideChatBox=not hideChatBox end},
|
WIDGET.newKey{name="hideChat",fText="...",x=410,y=40,w=60,font=35,code=function()hideChatBox=not hideChatBox end},
|
||||||
WIDGET.newKey{name="quit",fText="X",x=870,y=40,w=60,font=40,code=pressKey"escape"},
|
WIDGET.newKey{name="quit",fText="X",x=870,y=40,w=60,font=40,code=pressKey"escape"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user