GetRight() positioning problem
Hi guyz. :cool:
I want to move the FocusFrame's castbar (FocusFrameSpellBar) in a way that both frames (FocusFrame and FocusFrameSpellBar) have its right edges on the same line.
I can only change the X-offset of the anchor, because Blizzard's native code is constantly changing the anchor with different offsets and relative frames, to adjust the position of the castbar to the amount of buffs/debuffs of the FocusFrame.
I'm using GetRight() for the task:
But it doesn't works, the final position is not correct. :(
I have used the same technique (substraction using GetRight() values) with textures with success, but looks like when it's 2 frames with different scales, it's not that easy. :-/
Does anybody knows the solution? :confused:
The player, target, and focus frames (probably arena and boss frames too) are actually larger than what is visible. The invisible portion is on the portrait side which would be the reason for GetRight seeming to return an incorrect value for the focus frame. To test in game just do /framestack and see when it says you are over the focus frame when mousing over the area around the portrait and just off to the side of it.
Try using the portrait's right instead:
I have tested it with /framestack and it happens in the portrait side (the extended invisible zone) like you say, although the code is still incorrect because the castbar ends up in a completely different position when I alter its scale (with scale 2 it ends up in the center of the screen lol). If the code were correct the castbar would always end up in the same position. :(
I have also tried dividing instead of multiplying without success.
It works perfect Vrul, THX! :D
My project is complete now, this was the last thing I needed to finish it.
The project consists on an horizontal inversion of Blizzard's FocusFrame, to make it symmetrical with the TargetFrame on UI's that use Target on left and Focus on right (very common frame distribution on high level PvP).
And this is what I really wanted to do (imitate the castbar positioning of the TargetFrame on the inverted FocusFrame, which I can do now using your formula and the FocusFrameManaBar:GetRight() value). I used just the default focus in the question to make it more simple without having to explain the project. :p
I will release it tomorrow, now I need to sleep. :p
|All times are GMT -6. The time now is 03:35 AM.|
vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI