微调文本框控件滚动条件,微调联网游戏按钮行为,微调控制台输出空行的时机
This commit is contained in:
@@ -923,8 +923,8 @@ function textBox:update()
|
||||
end
|
||||
function textBox:push(t)
|
||||
ins(self.texts,t)
|
||||
if self.scrollPos==#self.texts-1 then
|
||||
self.scrollPos=#self.texts
|
||||
if self.scrollPos==(#self.texts-1-self.capacity)*self.lineH then--minus 1 for the new message
|
||||
self.scrollPos=min(self.scrollPos+self.lineH,(#self.texts-self.capacity)*self.lineH)
|
||||
end
|
||||
end
|
||||
function textBox:press(x,y)
|
||||
|
||||
@@ -846,9 +846,6 @@ function scene.keyDown(key)
|
||||
if history[27]then rem(history,1)end
|
||||
hisPtr=nil
|
||||
|
||||
--Insert empty line
|
||||
log""
|
||||
|
||||
--Execute
|
||||
if input:byte()==35 then
|
||||
--Execute lua code
|
||||
@@ -882,6 +879,9 @@ function scene.keyDown(key)
|
||||
end
|
||||
end
|
||||
inputBox:clear()
|
||||
|
||||
--Insert empty line
|
||||
log""
|
||||
elseif key=="up"then
|
||||
if not hisPtr then
|
||||
hisPtr=#history
|
||||
|
||||
@@ -70,7 +70,6 @@ function scene.keyDown(key,isRep)
|
||||
if testButton(3)then
|
||||
if WS.status('app')=='running'then
|
||||
NET.tryLogin(false)
|
||||
MES.new('info',text.wsConnecting)
|
||||
elseif WS.status('app')=='dead'then
|
||||
NET.wsconn_app()
|
||||
SFX.play('connect')
|
||||
|
||||
Reference in New Issue
Block a user