Thread Tools Display Modes
04-22-11, 12:52 AM   #1
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 284
Desaturation issue on TargetFrameTexture

I lose desaturation of my target frame texture after targeting an elite unit. The saturation then remains for all selected targets until reload.

I'm testing with this:

Code:
TargetFrameTextureFrameTexture:SetDesaturated(1)
And seeing this:



Prior to targeting the elite, all selected targets are desaturated as intended...seems the gold elite texture breaks/reverts desaturation . Any ideas?
  Reply With Quote
04-22-11, 03:48 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
My guess is saturation resets when a texture loads an image. Have you tried setting desaturation again after switching targets?
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
04-26-11, 11:52 AM   #3
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 284
Originally Posted by SDPhantom View Post
My guess is saturation resets when a texture loads an image. Have you tried setting desaturation again after switching targets?
I'd like to give this a shot, but wondering what the advisable method is. Would it be a function for calling "OnShow" of the target frame texture?
  Reply With Quote
04-26-11, 01:18 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
It appears the function responsible for changing the texture is TargetFrame_CheckClassification() located at line 293 in TargetFrame.lua. I would suggest a hook like the following code.
Code:
hooksecurefunc("TargetFrame_CheckClassification",function(self)
	self.borderTexture:SetDesaturated(1);
end);
Note self.borderTexture is the pointer used in the original function to set the texture.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
04-28-11, 11:35 PM   #5
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 284
Originally Posted by SDPhantom View Post
It appears the function responsible for changing the texture is TargetFrame_CheckClassification() located at line 293 in TargetFrame.lua. I would suggest a hook like the following code.
Code:
hooksecurefunc("TargetFrame_CheckClassification",function(self)
	self.borderTexture:SetDesaturated(1);
end);
Note self.borderTexture is the pointer used in the original function to set the texture.
This worked copy/paste verbatim ...thank you! /bow
  Reply With Quote
04-29-11, 03:16 PM   #6
kraftman
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 63
I've been having a lot of similar issues with textures recently too. It seems you cant set the saturation of a hidden texture, and changing a texture resets the saturation. PITA
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Desaturation issue on TargetFrameTexture


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off