WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   Changing the Scale for ClassNameplateBar (https://www.wowinterface.com/forums/showthread.php?t=55007)

Sekzey 01-15-17 08:49 PM

Changing the Scale for ClassNameplateBar
 
Hello all!

I am in the process of scaling down the personal resource bars (located below the character).

I have been able to reduce the scaling for the following:

ClassNameplateManaBarFrame:SetScale(0.7)
ClassNameplateBarRogueDruidFrame:SetScale(0.5)

but, I have yet to have any luck changing the healthbar that shows up below my character! I can only change my rogue's energy and combo points sizes.

I've tried ClassNameplateBarFrame:SetScale(0.7) to no avail.

Anyone have any advice?

I was looking here for what I have so far. https://github.com/tomrus88/Blizzard...ard_NamePlates

Thanks!

~Sekzey

SDPhantom 01-15-17 09:11 PM

Lua Code:
  1. hooksecurefunc(NamePlateDriverFrame,"OnNamePlateCreated",function(self,base)
  2.     base.UnitFrame:SetScale(0.7);
  3. end);
This hooks the creation of the UnitFrames attached to NamePlates and adjusts their scale. The NamePlates themselves are scaled dynamically in C code, so they can't be adjusted.

Sekzey 01-15-17 09:58 PM

Thanks for the reply!

I ran your lua and it seems to work great!

Another issue has occurred. The first time the personal resource bar is loaded it scales it down, but when it fades and returns it goes back to it's previous settings.

Anyway to make it a permanent change?

Thanks!

SDPhantom 01-16-17 06:53 AM

What happens if you change OnNamePlateCreated to ApplyFrameOptions? The function args should still work.

Sekzey 01-17-17 11:48 PM

Looks like that worked! Thank you very very much!


All times are GMT -6. The time now is 06:35 AM.

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