WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   how to change healthBar width? (https://www.wowinterface.com/forums/showthread.php?t=59856)

Macblack13 04-18-24 03:24 PM

how to change healthBar width?
 
I'm trying to make NamePlate1.UnitFrame.healthBar.background:SetSize(100, 6) but only the height changes, the width doesn't change even if I use SetWidth, how can I change the width?

SDPhantom 04-19-24 04:12 PM

If it has more than one anchor set, it might be locked to the size of its parent. If you run :ClearAllPoints(), it'll wipe them out. You'll then need to redefine at least one anchor with :SetPoint() so the game knows where to render it on screen.

For example:
Lua Code:
  1. NamePlate1.UnitFrame.healthBar.background:ClearAllPoints();
  2. NamePlate1.UnitFrame.healthBar.background:SetPoint("CENTER");
  3. NamePlate1.UnitFrame.healthBar.background:SetSize(100,6);

sirpucna 04-19-24 06:10 PM

i've tried this in the past with success
Lua Code:
  1. C_CVar.SetCVar("NamePlateHorizontalScale", 2)


All times are GMT -6. The time now is 03:27 PM.

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