Bugfix: titles and backgrounds returned visible when updating a hidden panel
This commit is contained in:
parent
0bdd612252
commit
df565b2b47
4
api.lua
4
api.lua
@ -229,7 +229,7 @@ function Panel:update(def, txt_elems, img_elems)
|
||||
self.hud_text.bg_hud_txt = v
|
||||
self.background_def.text = v
|
||||
|
||||
if self.is_visible then
|
||||
if self:is_visible() then
|
||||
player:hud_change(self.hud_id.bg_hud_id, "text", v)
|
||||
end
|
||||
|
||||
@ -239,7 +239,7 @@ function Panel:update(def, txt_elems, img_elems)
|
||||
if k == "title" then
|
||||
self.hud_text.text_hud_txt = v
|
||||
self.title_def.text = v
|
||||
if self.is_visible then
|
||||
if self:is_visible() then
|
||||
player:hud_change(self.hud_id.text_hud_id, "text", v)
|
||||
end
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user