WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   PTR General Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=172)
-   -   TargetFrame texture (https://www.wowinterface.com/forums/showthread.php?t=59235)

sirpucna 09-25-22 03:18 AM

TargetFrame texture
 
This is for WoW 10.0x DF

I can't seem to figure out how to change the texture of the TargetFrame
I can set the PlayerFrame just fine like this:
Code:

PlayerFrameHealthBar:SetStatusBarTexture(423819)
Any snippets much appreciated.

SDPhantom 09-25-22 06:03 AM

TargetFrame's health bar should be able to be accessed by TargetFrame.TargetFrameContent.TargetFrameContentMain.HealthBar.

sirpucna 09-25-22 06:34 AM

i tried that exact line, i couldn't modify it.
even tried using Terciob's Frame Inspect addon to edit it on the fly.

SDPhantom 09-26-22 07:05 AM

I just ran it on PTR and saw it apply.
Code:

/run TargetFrame.TargetFrameContent.TargetFrameContentMain.HealthBar:SetStatusBarTexture(423819)

sirpucna 09-26-22 07:56 AM

cheers, it is indeed changing, i did the same thing before, however i wasn't targeting anything and when the frame updated, the change refreshed back to default.
next step, figure out how to make it stick.

SDPhantom 09-26-22 02:37 PM

Looks like it's getting updated by TargetFrameMixin:CheckClassification() through :SetAtlas() at lines 372 and 385.

sirpucna 10-01-22 01:24 AM

do you know how to change the color of the texture in the playerframe and targetframe.

specifically this texture, its green.
<BarTexture atlas="UI-HUD-UnitFrame-Player-PortraitOn-Bar-Health"/>

Code:

function UFPlayerFrame(self)
        self.healthbar:SetStatusBarColor(.23,.2,.93)
end
hooksecurefunc("PlayerFrame_ToPlayerArt", UFPlayerFrame)

still has a tint of green,

SDPhantom 10-02-22 02:15 PM

It's controlled through UnitFrameHealthBar_Update(), so I'd start there.

sirpucna 10-07-22 04:25 AM

ended up having to look at the:
https://wowpedia.fandom.com/wiki/Pat....0/API_changes

and sure enough a new line listed for exactly what i needed since everything else i tried didn't work.

Code:

StatusBar:SetStatusBarDesaturated(1)
turns the green into grey, after which you then color it anyway you like.


All times are GMT -6. The time now is 01:45 AM.

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