Thread Tools Display Modes
10-10-11, 02:28 PM   #1
Mock
A Black Drake
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 83
Post Change some blizzard events

Hallo,

Playing around with an oUF layout here, specifically the eclipse bar. Trying to use the blizzard power text fontstring but having some problems. Got this so far:

Code:
			EclipseBarFrame:SetParent(oUF_Neav_Player)
			EclipseBarFrame:SetScale(config.units.player.scale * 0.82)
			EclipseBar_OnLoad(EclipseBarFrame)
			EclipseBarFrame:ClearAllPoints()
			EclipseBarFrame:SetPoint('TOP', oUF_Neav_Player, 'BOTTOM', 30, 2)
			EclipseBarFrame:Show()
			
			EclipseBarFrame.powerText:SetParent(EclipseBarFrame)
           		EclipseBarFrame.powerText:SetFont(config.font.normal, 10)
			EclipseBarFrame.powerText:ClearAllPoints()
			EclipseBarFrame.powerText:Show()
		        EclipseBarFrame.powerText:SetShadowOffset(1, -1)
		        EclipseBarFrame.powerText:SetPoint('CENTER', EclipseBarFrame, 0, 0.5)
Everything is working good except i want the text to always be shown, now it's only on mouseover. So I'm asking for a way to modify it to the text always shown, maybe unregister something for.. yeah you catch my drift. Anyone know a cheap way in doing this? Here's my sources:

http://wowprogramming.com/utils/xmlb...seBarFrame.lua
http://wowprogramming.com/utils/xmlb...seBarFrame.xml

Thanks for any help
  Reply With Quote
10-10-11, 04:21 PM   #2
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Try:

Code:
EclipseBarFrame.powerText.Hide = function() end
Or in case they use SetAlpha:

Code:
EclipseBarFrame.powerText:SetAlpha(1)
EclipseBarFrame.powerText.SetAlpha = function() end
Mind you, you can just get rid of the default eclipse bar and use the oUF element to make your own.
  Reply With Quote
10-11-11, 11:51 AM   #3
Mock
A Black Drake
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 83
Thanks, gonna try it when I got some time. But just curious, this changes the specific function to do nothing if I'm right?
  Reply With Quote
10-11-11, 01:32 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Yes. That's the simplest way to ensure that something is always shown. You will probably also want to call blah:Show() on it to make sure it's shown at the same time you disable its Hide method.
  Reply With Quote
10-11-11, 01:37 PM   #5
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Yes, don't forget the Show() method too, I didn't include that since it was in your code already.
  Reply With Quote
10-11-11, 03:28 PM   #6
Mock
A Black Drake
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 83
Thanks guys, works like a charm now. I decided to just modify the standard blizzard since most of it fits pretty nicely, and if I'm not mistaken it's lighter that way. Not that it matters but one cycle here and one cycle thereadds up
  Reply With Quote
10-11-11, 03:46 PM   #7
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
It's indeed lighter, and yes it'll make no difference but like you said, if you use that reasoning every time then you will end up with pretty long load times
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Change some blizzard events


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