Quantcast Anchoring Items/Scaling - ESOUI
Thread Tools Display Modes
07/13/18, 07:45 PM   #1
Devisaur
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 6
Anchoring Items/Scaling

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?
Attached Thumbnails
Click image for larger version

Name:	Example.PNG
Views:	42
Size:	104.2 KB
ID:	1019  
  Reply With Quote
07/13/18, 08:29 PM   #2
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 316
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.
  Reply With Quote
07/14/18, 06:41 AM   #3
Devisaur
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 6
Awesome, I'll give that a try thanks!
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Anchoring Items/Scaling

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off