• Collapsable Derma
    7 replies, posted
Is there a Derma panel that has the same collapsablity as the tools in the spawnmenu where it moves everything below it up and down, but able to add other Derma panels like the DCollapsibleCategory can?
Can you make your own? It's only a button and resizing content, right?
Well that's looking like what I will have to do, but what I'm talking about has a sliding animation and slides everything down and up nicely. Resizing will probably cause flickering everytime it's changed.
That's exactly what DCollapsibleCategory is for, what's wrong with it?
It's not moving the things below it down. Maybe I'm using it wrong? I'm parenting 2 of them to a DPanel and setting the 2nd ones position about 30 below the first ones. The top one just expands over or under the 2nd one.
I don't know how the spawn menu does it, but you could use a timer to move controls manually.
You could take a look at gamemodes/sandbox/gamemode/toolpanel.lua and see how garry does it, from what I read there, DPanelList.SetAutoSize and Panel.Dock appear to be related to what you want.
Thanks for the help and references guys. Got it working (: Hmm... actually it only appears when I use dock which overwrites everything. I'll try and figure it out.
Sorry, you need to Log In to post a reply to this thread.