ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Anchoring Items/Scaling (https://www.esoui.com/forums/showthread.php?t=7929)

Devisaur 07/13/18 07:45 PM

Anchoring Items/Scaling
 
1 Attachment(s)
I'd like to allow users to to be able to scale the text and icons in my addon, however when I scale the icons (using SetDimension) they start to overlap and expand past the container (see attached image).

Is there a way to have them all scale up/down together?

Dolgubon 07/13/18 08:29 PM

That would be because SetDimension changes the dimensions, not the scale. For textures, it does change the scale, but I think those might be the only things. So what you could do is change the dimension of the window, as well as all the textures in it. However, there's an easier way. If you use SetScale instead, child controls will be scaled appropriately. The only caveat is that anchors are not scaled, so if you have a large offset, it'll look pretty weird. To get around this, anchor things to whatever is right next to it, instead of the parent. You may also need to introduce some 'dummy' controls, which only serve to make an 'anchor' that scales.

Devisaur 07/14/18 06:41 AM

Awesome, I'll give that a try thanks!


All times are GMT -6. The time now is 12:30 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI