Thread Tools Display Modes
12-26-08, 12:58 PM   #361
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
i'm writing this out of sheer exasperation. I've been working solidly for three days to see which of my events is causing my raid layout to spew out errors; and i'm utterly out of ideas. I've checked documentation, forum threads, other people code and still nothing.

http://obble.pastey.net/105064 Is my layout.

Can anyone spot what the event is that i'm calling that no longer exists? :<
 
12-26-08, 01:07 PM   #362
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
You don't register any events in that layout.
 
12-26-08, 01:10 PM   #363
Penthouse36
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Feb 2008
Posts: 4
I see why altering aura.lua is bad. But I couldn't get things to work like I wanted without it. Maybe someone could help me out so I can leave aura.lua be.

Inside aura.lua, I took:

Code:
		if((isDebuff and icons.showDebuffType) or (not isDebuff and icons.showBuffType) or icons.showType) then
			local color = DebuffTypeColor[dtype] or DebuffTypeColor.none

			icon.overlay:SetVertexColor(color.r, color.g, color.b)
			icon.overlay:Show()
			icon.count:SetText((count > 1 and count))
		else
			icon.overlay:Hide()
		end

and changed it to:

Code:
		if (not isDebuff and isPlayer) then
			icon.overlay:SetVertexColor(0, 1, 0)
			icon.overlay:Show()
			icon.count:SetText((count > 1 and count))
		elseif (not isDebuff) then
			icon.overlay:SetVertexColor(0.5, 0.5, 0.5)
			icon.overlay:Show()
			icon.count:SetText((count > 1 and count))			
		elseif((isDebuff and icons.showDebuffType) or (not isDebuff and icons.showBuffType) or icons.showType) then
			local color = DebuffTypeColor[dtype] or DebuffTypeColor.none

			icon.overlay:SetVertexColor(color.r, color.g, color.b)
			icon.overlay:Show()
			icon.count:SetText((count > 1 and count))
		else
			icon.overlay:Hide()
		end
This colored my buffs green, other buffs grey and debuffs by type.

I tried to simply use this in my layout instead:

Code:
local function PostUpdateAuraIcon(icons, unit, icon, index, offset, filter, isDebuff)
		if (not isDebuff and isPlayer) then
			icon.overlay:SetVertexColor(0, 1, 0)
			icon.overlay:Show()
			icon.count:SetText((count > 1 and count))
		elseif (not isDebuff) then
			icon.overlay:SetVertexColor(0.5, 0.5, 0.5)
			icon.overlay:Show()
			icon.count:SetText((count > 1 and count))			
		elseif((isDebuff and icons.showDebuffType) or (not isDebuff and icons.showBuffType) or icons.showType) then
			local color = DebuffTypeColor[dtype] or DebuffTypeColor.none

			icon.overlay:SetVertexColor(color.r, color.g, color.b)
			icon.overlay:Show()
			icon.count:SetText((count > 1 and count))
		else
			icon.overlay:Hide()
		end
end
But it wasn't that simple (you coders are probably laughing right now)

Tried lots of variations aswell, but it keeps throwing errors at me. I'm pretty sure it would be fairly simple to achieve what I want from within my layout, but it's beyond me at this point.

Sorry for the noobness
 
12-26-08, 01:20 PM   #364
Kellen
A Deviate Faerie Dragon
Join Date: Mar 2008
Posts: 18
I think ObbleYeah's confusion is similar to my own. If the error checking code suggested earlier reports a problem with an event that wasn't explicitly registered in my layout (or any layout), why is that an error? I realize that a missing handler is the problem, but if I didn't register it, why is it triggering?

For me it seems to be UNIT_AURA fired from 'player'. But I don't have anything to that effect in my layout. Is the answer to make a noop handler for it?
 
12-26-08, 01:23 PM   #365
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Kellen View Post
I think ObbleYeah's confusion is similar to my own. If the error checking code suggested earlier reports a problem with an event that wasn't explicitly registered in my layout (or any layout), why is that an error? I realize that a missing handler is the problem, but if I didn't register it, why is it triggering?

For me it seems to be UNIT_AURA fired from 'player'. But I don't have anything to that effect in my layout. Is the answer to make a noop handler for it?
No, that's not the answer. If you can re-create the issue with a simple layout, and no plug-ins then post a bug report on oUF.
 
12-26-08, 01:36 PM   #366
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
Originally Posted by haste View Post
You don't register any events in that layout.
I thought i didn't
I think it's something to do with my party frames, as more errors spurt out the more party members there are. I'l see if i recreate it if i move my party header to my main layout.
 
12-27-08, 05:24 AM   #367
TacoEater
A Kobold Labourer
Join Date: Feb 2008
Posts: 1
Question Invert the Direction of StatusBar?

Hi there,

I've studied the codes from P3lim, ObbleYeah and health.lua in the "elements" folder, but still can't figure out how to change the direction where the status bar will deplete. For example, I'd like my target's health bar deplete from left to right -- just the opposite direction of the player's one.

Is there any trick to do this? Such as rotating the health bar for 180 degree.
 
12-27-08, 01:30 PM   #368
Lysiander
An Aku'mai Servant
Join Date: Dec 2007
Posts: 37
Hi there,

I have written a tag that shows me the target of a raidmember is the said raidmember is a designated MT or MA. Now I want to colorize the names of the target to be able to distinguish between the two, yet I do not know how. Its probably a simple solution and im just too blind to see it.

Here's the code:

Code:
	oUF.Tags['[raidtargetname]'] = 	function(u)
			if (not UnitExists(u)) then return "" end
			if not (GetPartyAssignment('MAINTANK', unit)) and not (GetPartyAssignment('MAINASSIST', unit)) then return '' 
			elseif (GetPartyAssignment('MAINTANK', unit)) and not (GetPartyAssignment('MAINASSIST', unit)) then return UnitName(u..'target')
			elseif (GetPartyAssignment('MAINASSIST', unit)) and not (GetPartyAssignment('MAINTANK', unit)) then return UnitName(u..'target')
		        end
		end
I want the UnitName(u..'target') part colored. I tried using the [raidtargetname] tag, but that gives me a weird bug where it shows the raidicons tiny above the frame.

Edit: Nevermind, got the colors working. Now I have to figure out how to limit the amount of characters displayed without getting the .. at the end if I just set a width. I love fidling with this stuff.

Edit2: Nevermind that as well. As p3lim pointed out a couple of pages back, string.sub does the trick. Now I gotta figure out why the raid target icon won't update. That edit will take a while tho.

Last edited by Lysiander : 12-27-08 at 08:25 PM.
 
12-28-08, 10:21 AM   #369
Tøra
A Murloc Raider
Join Date: Dec 2008
Posts: 6
--[[
-- oUF does to this for, but only for the first layout registered. I'm mainly
-- adding it here so people know about it, especially since it's required for
-- layouts using different styles between party/partypet/raid/raidpet. It is
-- however smart to execute this function regardless.
--
-- There is a possibility that another layout has been registered before yours.
--]]
oUF:SetActiveStyle"dLx"

local player = oUF:Spawn"player"
player:SetPoint("CENTER", "UIParent", "CENTER", -105, -134)
local pBG = addBG(player, dLx.oUF.playerBoxHeight, 209)
if (dLx.oUF.selectSound) then
pBG:RegisterEvent("PLAYER_TARGET_CHANGED")
pBG:SetScript("OnEvent", function() if(UnitExists("target")) then PlaySound("igCreatureAggroSelect") end end)
end

local target = oUF:Spawn"target"
target:SetPoint("CENTER", "UIParent", "CENTER", 101, -134)
local tBG = addBG(target, 57)

local tot = oUF:Spawn"targettarget"
tot:SetPoint("CENTER", "UIParent", "CENTER", 101, -189)
local totBG = addBG(tot)

local pet = oUF:Spawn"pet"
pet:SetPoint("CENTER", "UIParent", "CENTER", dLx.oUF.xpos+(dLx.oUF.xOffset*2), dLx.oUF.ypos)
local petBG = addBG(pet, 57)

local focus = oUF:Spawn"focus"
focus:SetPoint("CENTER", "UIParent", "CENTER", dLx.oUF.xpos+(dLx.oUF.xOffset*3), dLx.oUF.ypos)
local focusBG = addBG(focus)

if (dLx.oUF.showParty) then
local party = oUF:Spawn("header", "oUF_Party")
party:SetPoint("CENTER", -150, -330)
party:SetManyAttributes("showParty", true, "yOffset", -10)
party:Show()
I can't see the raid frame, only party frame i can see.
 
12-28-08, 11:47 AM   #370
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Tøra View Post
I can't see the raid frame, only party frame i can see.
There is no raid header spawned, no wonder you cant see one.
 
12-28-08, 11:50 AM   #371
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
How would i go about making the party frames spawn like...

[1][2][3][4][5] instead of

[1]
[2]
[3]
[4]
[5]

up and down
__________________
 
12-28-08, 11:53 AM   #372
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
Originally Posted by Alkar View Post
How would i go about making the party frames spawn like...

[1][2][3][4][5] instead of

[1]
[2]
[3]
[4]
[5]

up and down
You do xoffset instead of yoffset
__________________
All I see is strobe lights blinding me in my hindsight.
 
12-28-08, 12:03 PM   #373
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Something like this...

party:SetManyAttributes('xOffset', -20, 'showParty', true)
__________________
 
12-28-08, 12:05 PM   #374
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
Originally Posted by Alkar View Post
Something like this...

party:SetManyAttributes('xOffset', -20, 'showParty', true)
Yes, that would set the frames 20 pixels to the left of eachother
__________________
All I see is strobe lights blinding me in my hindsight.
 
12-28-08, 12:11 PM   #375
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Bah got this..


local party = oUF:Spawn('header', 'oUF_Party')
party:SetPoint('TOPLEFT', UIParent, 'TOPLEFT', 15, -15)
party:SetManyAttributes('xOffset', 20, 'showParty', true)

but just not working lolo its stacking them up and down still just closer i have to be doin something wrong here :P
__________________
 
12-28-08, 12:22 PM   #376
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
Originally Posted by Alkar View Post
Bah got this..


local party = oUF:Spawn('header', 'oUF_Party')
party:SetPoint('TOPLEFT', UIParent, 'TOPLEFT', 15, -15)
party:SetManyAttributes('xOffset', 20, 'showParty', true)

but just not working lolo its stacking them up and down still just closer i have to be doin something wrong here :P
This is what i use, you need columnAnchorPoint and unitsPerColumn, and columnSpacing if i remember correctly.
Code:
party:SetManyAttributes(
	"showParty", true,   
	"showRaid", false,   
	"columnSpacing", 10,   
	"unitsPerColumn", 1,   
	"maxColumns", 4,   
	"columnAnchorPoint", "LEFT",   
	"xOffset", 20   
)
__________________
All I see is strobe lights blinding me in my hindsight.
 
12-28-08, 02:21 PM   #377
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Thank ya so much wimp worked like a dream but now another issue..

i have party target frames and party pet frames and i cant get them to match up to what i have...

Code:
local party = oUF:Spawn('header', 'oUF_Party')
party:SetPoint('TOP', UIParent, 'TOP', 0, -700)
party:SetManyAttributes(
	"showParty", true,   
	"showRaid", false,   
	"columnSpacing", 10,   
	"unitsPerColumn", 1,   
	"maxColumns", 4,   
	"columnAnchorPoint", "LEFT",   
	"xOffset", 20   
)

local partyToggle = CreateFrame('Frame')

--local partypet = {}
--partypet[1] = oUF:Spawn('partypet1', 'oUF_PartyPet1')
--partypet[1]:SetPoint('TOPLEFT', party, 'TOPLEFT', 0, -24.5)
--for i =2, 4 do
--	partypet[i] = oUF:Spawn('partypet'..i, 'oUF_PartyPet'..i)
--	partypet[i]:SetPoint('TOP', partypet[i-1], 'BOTTOM', 0, -32)
--end

--local partytarget = {}
--for i = 1, 5 do
--	partytarget[i] = oUF:Spawn('party'..i..'target', 'oUF_Party'..i..'Target')
--	if i == 1 then
--		partytarget[i]:SetPoint('TOPLEFT', party, 'TOPRIGHT', 5, 0)
--	else
--		partytarget[i]:SetPoint('TOPLEFT', partytarget[i-1], 'BOTTOM', 0, -20)
--	end

Have them comment out right now until i get it fixed but what do you see i need to fix to have them say liek this..

Party
Partypet
partytarget
__________________
 
12-28-08, 02:34 PM   #378
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Alkar View Post
Thank ya so much wimp worked like a dream but now another issue..

i have party target frames and party pet frames and i cant get them to match up to what i have...

Code:
local party = oUF:Spawn('header', 'oUF_Party')
party:SetPoint('TOP', UIParent, 'TOP', 0, -700)
party:SetManyAttributes(
	"showParty", true,   
	"showRaid", false,   
	"columnSpacing", 10,   
	"unitsPerColumn", 1,   
	"maxColumns", 4,   
	"columnAnchorPoint", "LEFT",   
	"xOffset", 20   
)

local partyToggle = CreateFrame('Frame')

--local partypet = {}
--partypet[1] = oUF:Spawn('partypet1', 'oUF_PartyPet1')
--partypet[1]:SetPoint('TOPLEFT', party, 'TOPLEFT', 0, -24.5)
--for i =2, 4 do
--	partypet[i] = oUF:Spawn('partypet'..i, 'oUF_PartyPet'..i)
--	partypet[i]:SetPoint('TOP', partypet[i-1], 'BOTTOM', 0, -32)
--end

--local partytarget = {}
--for i = 1, 5 do
--	partytarget[i] = oUF:Spawn('party'..i..'target', 'oUF_Party'..i..'Target')
--	if i == 1 then
--		partytarget[i]:SetPoint('TOPLEFT', party, 'TOPRIGHT', 5, 0)
--	else
--		partytarget[i]:SetPoint('TOPLEFT', partytarget[i-1], 'BOTTOM', 0, -20)
--	end

Have them comment out right now until i get it fixed but what do you see i need to fix to have them say liek this..

Party
Partypet
partytarget
That is not the proper way to spawn header's pets and targets, it should be done properly in templates, not by spawning them in tables.
That way they would be anchored properly aswell.

Even my own raid frames arent properly spawned, just that I havent bothered fixing something that works (for now).
 
12-28-08, 02:43 PM   #379
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Ok not sure what ya mean there P3lim... I'm such a noob to all this still so tryin to figure things out still....
__________________
 
12-28-08, 02:58 PM   #380
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Ill work out an example for you when I get the time.
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF - Layout discussion


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