diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 8d80ca93..d943c02b 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -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) diff --git a/parts/scenes/app_console.lua b/parts/scenes/app_console.lua index 3f7cf8b3..77ed85cf 100644 --- a/parts/scenes/app_console.lua +++ b/parts/scenes/app_console.lua @@ -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 diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index 3ddcf5bb..f6e33db8 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -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')