Hey guys sorry to keep asking so many questions but I was wondering if there was a way to constrain text to a DPanel/Label
All I'm wanting to do is make it so the text resizes automatically for different resolutions (kind of). I have a Derma with a rounded box and I'm wanting to shrink the text if the resolution is too small and enlarge to a default size when the resolution scales up all while staying within the confines of a roundedBox.
I was thinking size to contents but I don't that'd work as I'm wanting to size the content to the parent instead of the other way around. Anyone have any suggestions?
Use
http://wiki.garrysmod.com/page/Panel/SizeTo
And of course, after setting text Panel/SetWrap
ScrW() ; ScrH() - Variables for Screen Weight and Screen Height.
Start with setting panel pos with these variables like : Panel:SetPos( ScrW()/2,ScrH()/2 )
All children panels just have to size to parent, remember.
Sorry, you need to Log In to post a reply to this thread.