I found that even after the panel is closed, the variable keep's it... ID
<clip>
Is there any way to register when that has been pressed or just when the panel has been closed in general?
Ah, sorry about that. I forgot to tell you to account for the fact that Uwindow wasn't local to the function anymore, just the script.
When it's local to a function, it gets set back to nil after the function is over. When we removed it from the function and declared it local to the script, we have to manipulate it ourselves. Though we didn't want it to be nil at the beginning if the radio was playing, we do want it to go nil if the radio is stopped.
Glad to see you learned how to account and fix it yourself now though.
Wow, you seem to be learning quite nicely.
As for the X button, yes, there's a way to detect it. Unfortunately, I cant' find it on the Gmod wiki at the moment.
You know about the Gmod Lua wiki, right? Lots of insight to GLua can be found there to tinker with for various projects and ideas.
Several tutorals too.
Anyway, I found
this that could be used to now show the X. Perhaps that would work for you.
[Edit] Oh, that 'id' as you call it by the way is I believe a memory address where the object is stored. One of my fellow team mates can correct me on this, or elaborate if I'm close. It's not a string variable, so it doesn't get printed as a 'readable' string.