WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   nUI: Bug Reports (https://www.wowinterface.com/forums/forumdisplay.php?f=90)
-   -   HUD vfos drop due to viewport removal (https://www.wowinterface.com/forums/showthread.php?t=36947)

Gaenjin 11-22-10 11:02 AM

HUD vfos drop due to viewport removal
 
Wow, I did not think I would track this down due to not having my LUA or Diff tools anymore, so I had to do this via Notepad and eyeball...

In 5.7.06, the viewport was removed and the HUD positioning was fine (I just discovered that this was due to a global yfos setting in nUI_HUD.lua). In .07, the viewport was added back in, and the global yfos was reset back to its old value to compensate for having a viewport again.

But the viewport was removed again in .08, and the HUD dropped down because that global yfos value was not changed to account for the viewport loss.

I don't know the line #'s (just using Notepad to shoot this stuff), but in the .08 nUI_HUD.lua the value of 0 should be changed back to 150 as in the below snips from .08 and .06:
Code:

nUI_HUD.lua version 5.7.08

if (nUI_Options.hud_vOfs and nUI_Options.hud_vOfs ~= 0 and nUI_Options.hud_vOfs or 0) * nUI.vScale ~= hframe.vOfs then
                                                       
                                                        hframe.vOfs = (nUI_Options.hud_vOfs and nUI_Options.hud_vOfs ~= 0 and nUI_Options.hud_vOfs or 0) * nUI.vScale;
                                                       
                                                        hframe:ClearAllPoints();
                                                        hframe:SetPoint( "CENTER", WorldFrame, "CENTER", 0, hframe.vOfs );
                                               
                                                end

Code:

nUI_HUD.lua version 5.7.06

if (nUI_Options.hud_vOfs and nUI_Options.hud_vOfs ~= 0 and nUI_Options.hud_vOfs or 150) * nUI.vScale ~= hframe.vOfs then
                                                       
                                                        hframe.vOfs = (nUI_Options.hud_vOfs and nUI_Options.hud_vOfs ~= 0 and nUI_Options.hud_vOfs or 150) * nUI.vScale;
                                                       
                                                        hframe:ClearAllPoints();
                                                        hframe:SetPoint( "CENTER", WorldFrame, "CENTER", 0, hframe.vOfs );
                                               
                                                end

I believe that changing this value to 150 this will also be a good fix for skins like InvisiSkin, when they want to get rid of the big black box, rather than tweaking all the different element yfos values by hand.

I hope I'm correct, I'm really rusty on my coding skills, but I did log in and verify that this change does reset the all of the HUD elements back to where they're supposed to be (or thereabouts). Hope this helps folks get their HUD elements straightened out.

spiel2001 11-22-10 12:01 PM

Hmm... if you look in [ nUI > Tools > nUI_Config.lua ] I think you'll find that I set the vOfs value for the HUD to 150 in there didn't I?

bwhansen 11-22-10 12:25 PM

I also have noticed that my hud seems to have moved upwards on the screen, which I think is what is being talked about here.


Edited to add info:

After playing with this for awhile, I decided to delete the WTF, Cache and Interface files. Re-installed nUI and logged in to find that my hud was back in its proper place.

As an example of what I meant by the hud moving upwards. It was truely more in the center (vertically) of the screen and all the elements had moved with it. Normally on my screen the lower edge of the hud is around my characters feet. Before I reset the holy trinity, the bottom of the hud was around my characters waist. On my DK the rune bar was across his head, normally its at his waist.

Dont know if this information is helpful, but I'd be even less helpful trying to dig into the code. Reading LUA to me is like speaking foreign languages...I know just enough to get my face slapped.


All times are GMT -6. The time now is 06:37 PM.

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