Thread Tools Display Modes
10-17-10, 12:13 PM   #1
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Cant add holypower/eclipes/shard bars? or am i just doing wrong?

i have this problem i've added soul shards/holypower/eclipes but it just doesnt work? does anyone know?

yes i do use 1.5

here is my full LUA: http://pastebin.com/4yVrm8qg
  Reply With Quote
10-17-10, 02:32 PM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
I'm hopefully not the only one thinking this.. but your layout is one big incorrectly indented if-hell.

For anyone who dares to look into it, here is a version of the code above which I ran through vim.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
10-17-10, 02:44 PM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
haste come on, be polite. Everyone is appreciating the hard work you invest into doing this. At least I am.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
10-17-10, 03:26 PM   #4
Monolit
A Black Drake
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 81
OFFtopic:
Originally Posted by haste View Post
I'm hopefully not the only one thinking this.. but your layout is one big incorrectly indented if-hell.
lua Code:
  1. .
  2.                             end
  3.                         end
  4.                     end
  5.                 end
  6.             end)
  7.         end
  8.     end
@ castbars
sorry for off-topic, just found that kind of funny

On a side note: why do you still use oUF_RuneBar for runes? It's been ages since haste implemented this into oUF core.
  Reply With Quote
10-17-10, 06:51 PM   #5
neverg
A Frostmaul Preserver
 
neverg's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 268
Game92 for others to help you try to give more information that "just doesn't work". Any error popping up?

For example, to create Holy Power I simply created a Tag (because I'm outputing it through Text):

Code:
	-- Holy Power
	oUF.Tags["lumen:holypower"] = function(unit)
	
		local hp = UnitPower('player', SPELL_POWER_HOLY_POWER)
		local str
		
		if hp == 1 then
			str = string.format("|CFFffffff%d|r",hp)
		elseif hp == 2 then
			str = string.format("|CFFfff880%d|r",hp)
		elseif hp == 3 then
			str = string.format("|CFFf5e92f%d|r",hp)
		else
			str = ""
		end
		
		return str
	end

	
	oUF.TagEvents["lumen:holypower"] = "UNIT_POWER"

See other layouts on how to add runes to your layout, Shards is basicly the same way, but instead of using .Runes element you use .SoulShards. Hope that helps.
__________________
My oUF Layout: oUF Lumen

Last edited by neverg : 10-17-10 at 06:54 PM.
  Reply With Quote
10-17-10, 09:53 PM   #6
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
@Game92,

Your code would be a lot easier to keep track off if you used the UnitSpecific and Shared sections, the if iterations probably slow down everything (only by a little).

Your shard section -> SetSize(230, -10)
You gave it a negative height, could be part of the issue.

HolyPower -> you didn't use an index in your for loop.
holyRune[i]

I can't help you with the eclipsebar though, I've got a feral druid lvl33, so no dual spec yet :P

I hope seeing my SoulShards code will help you some

Code:
-- SoulShards
        if select(2, UnitClass("player")) ==  "WARLOCK" then
            self.SoulShards = CreateFrame("Frame", nil, self)
            self.SoulShards:SetSize(plWidth, 7)
            self.SoulShards:SetPoint("TOPLEFT", self.Power, "BOTTOMLEFT", 0, -2)
            self.SoulShards:SetPoint("TOPRIGHT", self.Power, "BOTTOMRIGHT", 0, -2)

            for i = 1, SHARD_BAR_NUM_SHARDS do
                self.SoulShards[i] = self.SoulShards:CreateTexture(nil, 'OVERLAY')
                self.SoulShards[i]:SetSize((plWidth-2)/SHARD_BAR_NUM_SHARDS, 5)
                self.SoulShards[i]:SetTexture(texture)
                self.SoulShards[i]:SetVertexColor(0, 144/255, 1)
                
                if (i == 1) then
                    self.SoulShards[i]:SetPoint("TOPLEFT", self.SoulShards, "TOPLEFT", 0, -1)
                else
                    self.SoulShards[i]:SetPoint("TOPLEFT", self.SoulShards[i-1], "TOPRIGHT", 1, 0)
                end
                
                -- so we have a bar when it's depleted
                self.SoulShards[i].bg = self.SoulShards:CreateTexture(nil, "BACKGROUND")
                self.SoulShards[i].bg:SetAllPoints(self.SoulShards[i])
                self.SoulShards[i].bg:SetTexture(texture)
                self.SoulShards[i].bg.multiplier = .4
            end
            self.SoulShards:SetBackdrop{
                bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
                insets = {left = -2, right = -2, top = 0, bottom = -2},
            }
            self.SoulShards:SetBackdropColor(0, 0, 0, .8)
        end
    end,
Originally Posted by haste View Post
I'm hopefully not the only one thinking this.. but your layout is one big incorrectly indented if-hell.

For anyone who dares to look into it, here is a version of the code above which I ran through vim.
Thank you for running it through vim (ps.. gotta love vim huh :P On Win I use Notepad++ though for the tabbed interface)

But no, Haste, you're not the only one. That said, not everyone is an amazing whiz like you are when it comes to programming, I sure ain't. Heck, I would give a lot to even come remotely close :P

Originally Posted by Monolit View Post
On a side note: why do you still use oUF_RuneBar for runes? It's been ages since haste implemented this into oUF core.
Maybe he prefers the way he can use it? Though I've noticed little difference when I swapped from oUF_Runebar to the built-in.

Last edited by MoonWitch : 10-17-10 at 09:55 PM.
  Reply With Quote
10-18-10, 08:59 AM   #7
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
@ Haste

I dont find my layout a big mess, i know where the stuff is etc, and i guess everyone has thier own taste.

@ Zork

Indeed! I had hard work on this layout, if you look at jasjes layout witch i started out with as base, you will notice how many hours i spended on this.

@ Monolit

Yes that's abit funnie hhehe i didnt even know that exisisted. lol.
thanks anyways.

@ Neverg

Well, either shards/elipces/holypower is appearing and no LUA errors.
I will look in to this later, thanks for the help.

@ Moonwitch

If you looked in to the code abit you would understand it really easy like what is what, and so on.
I see, my bad, i guess. i will look in to the holypower then.
aha, too bad! I will look in to your shards code thanks!
  Reply With Quote
10-18-10, 10:46 AM   #8
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by neverg View Post
Game92 for others to help you try to give more information that "just doesn't work". Any error popping up?

For example, to create Holy Power I simply created a Tag (because I'm outputing it through Text):

Code:
	-- Holy Power
	oUF.Tags["lumen:holypower"] = function(unit)
	
		local hp = UnitPower('player', SPELL_POWER_HOLY_POWER)
		local str
		
		if hp == 1 then
			str = string.format("|CFFffffff%d|r",hp)
		elseif hp == 2 then
			str = string.format("|CFFfff880%d|r",hp)
		elseif hp == 3 then
			str = string.format("|CFFf5e92f%d|r",hp)
		else
			str = ""
		end
		
		return str
	end

	
	oUF.TagEvents["lumen:holypower"] = "UNIT_POWER"

See other layouts on how to add runes to your layout, Shards is basicly the same way, but instead of using .Runes element you use .SoulShards. Hope that helps.

btw can you do the same with shards?

*EDIT i think i made it myself!*

*Edit full LUA: http://pastebin.com/hXkrBuZw*


Need to change the color ;> *edit fixed*

Going to change that aswell *edit fixed*

Last edited by Aftermathhqt : 10-19-10 at 11:32 AM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Cant add holypower/eclipes/shard bars? or am i just doing wrong?


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