Closing all open derma frames

Occasionally you fuck something up and are left with tiny unclosable derma frames that stop you doing anything else. Is there a way to close them all, other than reconnecting?

I know what you mean, it’s really annoying. It would be nice if there as a panel.GetAll() function.

But to answer your question, I don’t think there is. You would have to build in a timer or something in case, I guess.

You would have to loop through them all and close them with a for loop, but I don’t know for k,v pairs in(what?). You could do something like this though, as long as the dframe wasn’t local I think:

[lua]concommand.Add(“closeDerma”, function(frame)

I haven’t tested it, but it may be too simple to work actually. But if it did, it would error if the thing wasn’t a panel.

EDIT: Oops, beaten.

Do you mean when you forget panel:MakePopup()?

You can close those by pressing escape and closing them normally, I think.

no, when you misstype something in the layout function and everything ends up in the top left including the close button.

Sadly no unless those frames are global on the client and not local inside the function you can’t, even if it was u’d still need to remember what u named them…

Pain in the ass. happens to me wayyyy to much.

Here you go:


Used by garry when he needs to close all the derma menus in derma’s lua.

If this works, you are my god.