SecureGroupHeader InitialConfig scale does not affect header
When a scale is set in the initialconfiguration of a secure groupheader unit button it affects the button, but not the header.
Lua Code:
The result is sth like this: 0.5 scale: http://imgur.com/a/OWWvn 0.8 scale: http://imgur.com/a/ifeUa 1 scale: http://imgur.com/a/PrqBh 1.25 scale: (header does not even fit all the unit buttons!) http://imgur.com/a/1mdHn The header resize calculation works of the unit button width/height (https://github.com/tomrus88/Blizzard...aders.lua#L231), but for whatever reason it is ignoring the scale of the button resulting in a way to large unit header on low scale values and to low size if the scale is > 1. This destroys all offsets since it only works for scale 1 properly. |
I see what are you saying now, what happens if you create your unitbutton like this then?
Lua Code:
No scale attribute or 1, just setting the width/height multiplied with the scale itself. Edit: I think the style-scale attribute is broken too, if you use a simple SetScale on the header that should also get applied on every unit child which will also scale up the unit button's width/height and the offsets will work properly too: self.headers[i]:SetScale(1) |
I tried any variant of applying init-scale. None of them had an effect.
|
Quote:
You could try to do this too: Lua Code:
|
I will try your last idea later. The implementation has to be secure. Otherwise it is of no use since raid headers can be spawned in combat.
Maybe I can do this: Lua Code:
*edit* Tested it. The above is the solution! It works if you set the header scale instead of the unit button scale inside the initialConfiguration. |
All times are GMT -6. The time now is 07:51 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI