Thread Tools Display Modes
09-06-10, 10:25 PM   #1
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
oUF and HolyPower

Is it implemented yet over at git? I seen that it was added and downloaded it, and added this in my layout but it doesn't seem to be showing up? :O Unless its not fully implemented yet? Then forgive me lol.

Code:
local _, class = UnitClass("player")
		if (class == "PALADIN") then
			self.HolyPower = CreateFrame("Frame", nil, self)
			self.HolyPower:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, 1)
			self.HolyPower:SetSize(rwdth * PlayerScale/6 - 5, rht)
			self.HolyPower.anchor = ranchor
			self.HolyPower.growth = rgrwth
	
			for i = 1, 3 do					
				self.HolyPower[i]=CreateFrame("StatusBar", nil, self.HolyPower)
				self.HolyPower[i]:SetHeight(8)					
				self.HolyPower[i]:SetStatusBarTexture(bartex)
				self.HolyPower[i]:GetStatusBarTexture():SetHorizTile(false)
				self.HolyPower[i]:SetStatusBarColor(228/255,225/255,16/255)
			
			if i == 1 then
				self.HolyPower[i]:SetPoint("TOPLEFT", self.HolyPower, "TOPLEFT")
			else
				self.HolyPower[i]:SetPoint("RIGHT", self.HolyPower[i - 1], "LEFT", RxSpacing, RySpacing)
			end
			
			self.HolyPower[i].bg = self.HolyPower[i]:CreateTexture(nil, "BACKGROUND")
			self.HolyPower[i].bg:SetAllPoints(self.HolyPower[i])
			self.HolyPower[i].bg:SetTexture(bartex)
			self.HolyPower[i].bg.multiplier = .2
				
			self.HolyPower[i].bd = CreateFrame("Frame", nil, self.HolyPower[i])
			self.HolyPower[i].bd:SetPoint("TOPLEFT", self.HolyPower[i], "TOPLEFT", 0, 0)
			self.HolyPower[i].bd:SetPoint("BOTTOMRIGHT", self.HolyPower[i], "BOTTOMRIGHT", 0, 0)
			self.HolyPower[i].bd:SetFrameStrata("LOW")
			self.HolyPower[i].bd:SetBackdrop(backdrop)
			self.HolyPower[i].bd:SetBackdropColor(0, 0, 0, 1)
			self.HolyPower[i].bd:SetBackdropBorderColor(0, 0, 0)
		end
end
  Reply With Quote
09-06-10, 11:42 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Not sure it has been tested out properly, though you are welcome to do it
  Reply With Quote
09-07-10, 01:52 AM   #3
Broes
A Deviate Faerie Dragon
Join Date: Jul 2010
Posts: 11
I'll grab the latest commits later today and test it as well
  Reply With Quote
09-07-10, 03:15 AM   #4
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
I tested out the patch before submitting it, so I have seen it working. When adding support to my layout I created each holyRune as a texture rather than a status bar.

You example looks mostly fine, but I would make sure you set the width of each of your holyRunes, otherwise you will not see them...


------

just dry-coded this, but it might work...
Code:
	local _, class = UnitClass('player')

	if class == 'PALADIN' then
		local holyPower = CreateFrame('Frame', nil, self)
		holyPower:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -1)
		holyPower:SetSize(config.PRIMARYUNITWIDTH, config.SPACING)
		holyPower:SetBackdrop(config.BACKDROP)
		holyPower:SetBackdropColor(0, 0, 0)

		for i = 1, MAX_HOLY_POWER do
			local holyRune = holyPower:CreateTexture(nil, 'OVERLAY')
			holyRune:SetSize((config.PRIMARYUNITWIDTH / MAX_HOLY_POWER) - 1, config.SPACING)
			holyRune:SetTexture(1, 3 / 5, 0)

			if i > 1 then
				holyRune:SetPoint('LEFT', holyPower[i - 1], 'RIGHT', 1, 0)
			else
				holyRune:SetPoint('BOTTOMLEFT', holyPower, 'BOTTOMLEFT', 1, 0)
			end

			holyPower[i] = holyRune
		end

		self.HolyPower = holyPower
	end

Last edited by yj589794 : 09-07-10 at 03:37 AM. Reason: addition of example
  Reply With Quote
09-07-10, 04:46 AM   #5
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
It's working, I'm just retarded.... Thank you everyone! lol

edit - It ain't updating, anyway I can register it to an event? I did and I get no error but reloading or entering toon makes it to where it shows all three until i attack something to gain a holyrune

Last edited by Ferous : 09-07-10 at 04:51 AM.
  Reply With Quote
09-07-10, 06:16 AM   #6
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
The element should manage all the events and updating without the user having to specify anything extra.

The testing I did was on a pre-made paladin in holy spec:
  • Log into character and no holy runes were shown
  • cast Holy Shock and see that player has 1 holyRune displayed
  • cast Word of Glory and see that player no longer has any holyRunes
  • repeat casting Holy Shock and Word of Glory at multiple levels of holyRunes for consistancy
  • log out with some holyRunes and then log back in. No holyRunes displayed and on casting Holy Shock the player now has 1 holyRune

While this testing is not all encompassing, it should cover basic rune display.

Can you describe the steps you are trying to perform and your HolyPower code. I'll graft it into my layout tonight and try to repeat your tests.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF and HolyPower


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