修复控件系统和hide属性相关的一个致命bug

This commit is contained in:
MrZ626
2021-04-08 17:44:07 +08:00
parent 2a098a9445
commit 23d6444a54

View File

@@ -420,7 +420,7 @@ function slider:update()
self.ATV=atv self.ATV=atv
end end
end end
if not(self.hide and self.hide())then if not(self.hide==true or self.hide and self.hide())then
self.pos=self.pos*.7+self.disp()*.3 self.pos=self.pos*.7+self.disp()*.3
end end
end end
@@ -845,7 +845,7 @@ 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 and not(self.hide and self.hide())then if self.scrollPos==#self.texts-1 and not(self.hide==true or self.hide and self.hide())then
self.scrollPos=#self.texts self.scrollPos=#self.texts
else else
SFX.play("spin_0",.8) SFX.play("spin_0",.8)