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