微调文本框控件滚动条件,微调联网游戏按钮行为,微调控制台输出空行的时机

This commit is contained in:
MrZ626
2021-06-25 23:41:06 +08:00
parent 14852fa3e9
commit 076d854f11
3 changed files with 5 additions and 6 deletions

View File

@@ -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)