My mod uses mod_gui and I place button elements in the top gui - button_flow
There are cases where I would like to have the ability to toggle the display of my mods buttons and I have that worked out
...Except, when I turn my mod's display (mod.destroy()) I am left with essentially, a top gui artifact. The empty frames are being drawn and I can't figure out the proper way to either remove or make not visible, let alone a good/better way to detect the empty inner_frame than a bunch of if statements walking the top gui structure to determine that the top gui is indeed empty.
Before:
After:
More detail:
mod_gui without children
Re: mod_gui without children
Hi, can you share the code to do some tests?
It doesn't have to be everything, just the essentials.
It doesn't have to be everything, just the essentials.
Solo entiendo español, pero si tu también lo entiendes, escríbeme


Everything i write in English is translated by Deepl.

Re: mod_gui without children
Edit: {Persistence}
Code: Select all
for _, player in pairs(game.players) do
for _, root in pairs({ player.gui.top, player.gui.left }) do
local artifact = root.mod_gui_top_frame
if artifact and artifact.valid then
artifact.destroy()
end
end
end