Thread Tools Display Modes
12-29-13, 01:00 PM   #41
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Originally Posted by Phanx View Post
If you're using !Beautycase in the rest of your UI, just use it in your oUF layout instead of duplicating its functionality.
Mmm it's a ridiculous attempt at planning to eventually release the unitframes for standalone, in hindsight should probably do that anyways.
__________________
Tweets YouTube Website
  Reply With Quote
12-29-13, 01:51 PM   #42
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Never do today what you can put off 'til tomorrow!
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-29-13, 02:11 PM   #43
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Originally Posted by Phanx View Post
Never do today what you can put off 'til tomorrow!
My lifes creed.
__________________
Tweets YouTube Website
  Reply With Quote
12-29-13, 03:26 PM   #44
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
You should be actually getting an error from oUF
Style [Bob] already registered.
as you've given your 2 styles the same name.

You'd better spawn party and raid as header units. Use SpawnHeader for that. If you do this, remove the SetSize calls for party/raid from your style function (Shared and UnitSpecific) as this would cause errors when joining party/raid in combat. To set the size of headers you use oUF-initialConfigFunction. Also, oUF guesses the unit it passes to your style function based on the header attributes you define. If you use showRaid to show your party frames when in raid, oUF will think your party is actually a raid. I give my headers unique global names and match against that to filter party in the style function. There may be another way for this though.

Last edited by Rainrider : 12-29-13 at 03:28 PM. Reason: Text coloring need fixing
  Reply With Quote
12-29-13, 08:27 PM   #45
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Rainrider View Post
I give my headers unique global names and match against that to filter party in the style function. There may be another way for this though.
Yes, there is, and I've already posted about it in this thread -- twice! -- but nobody seems to be reading it.

http://www.wowinterface.com/forums/s...t.php?p=288747
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-31-13, 12:19 AM   #46
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Originally Posted by Phanx View Post
Yes, there is, and I've already posted about it in this thread -- twice! -- but nobody seems to be reading it.

http://www.wowinterface.com/forums/s...t.php?p=288747
If you create party by using SpawnHeader, oUF guesses the unit for you. If you create the frames by using Spawn, the unit is then the first argument you feed it, meaning is will be party1 and so on. I don't see how your post would help in the situation when using both SpawnHeader and showRaid for party.
  Reply With Quote
12-31-13, 12:46 AM   #47
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Why are you showing your party frames in a raid?
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-31-13, 12:47 AM   #48
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Originally Posted by Rainrider View Post
If you create party by using SpawnHeader, oUF guesses the unit for you. If you create the frames by using Spawn, the unit is then the first argument you feed it, meaning is will be party1 and so on. I don't see how your post would help in the situation when using both SpawnHeader and showRaid for party.
Her post fixed my issue actually.
The strmatch (and if Safari autocorrects strmatch to stretch once more, I'll eat my shoes) strips the number from the frame name, thus allows UnitSpecifc to work.
__________________
  Reply With Quote
12-31-13, 12:55 AM   #49
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by MoonWitch View Post
... if Safari autocorrects strmatch to stretch once more, I'll eat my shoes...
Autocorrect is definitely in the running for the "worst invention ever" prize. I have it disabled everywhere, but I do use the Swype keyboard in my phone, and while I generally love it, it constantly thinks I'm more likely to be typing "getty" than "get". No, phone, no I am not. Nobody has ever used the word "getty" except when talking about the Gettysburg Address, and nobody has ever talked about the Gettysburg Address on their cell phone.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-31-13, 12:57 AM   #50
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Originally Posted by Phanx View Post
Autocorrect is definitely in the running for the "worst invention ever" prize. I have it disabled everywhere, but I do use the Swype keyboard in my phone, and while I generally love it, it constantly thinks I'm more likely to be typing "getty" than "get". No, phone, no I am not. Nobody has ever used the word "getty" except when talking about the Gettysburg Address, and nobody has ever talked about the Gettysburg Address on their cell phone.
So what you're saying is that I can't talk history on my phone? :P
__________________
  Reply With Quote
12-31-13, 12:59 AM   #51
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I know you're terribly disappointed, but the answer is still no.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-31-13, 01:10 AM   #52
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Originally Posted by Phanx View Post
Why are you showing your party frames in a raid?
me or Rain?
__________________
Tweets YouTube Website
  Reply With Quote
12-31-13, 01:13 AM   #53
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Originally Posted by 10leej View Post
me or Rain?
I think all of us, because honestly : if you have showRaid set to true, oUF will always assume it's raid frames. If you then don't add
Lua Code:
  1. UnitSpecific.raid = UnitSpecific.party
your party frames will never use the party setup you've created. The frames you create from SpawnHeader are seen as raid frames.

So if you want to show your party frames in a raid and use SpawnHeader, add that UnitSpecific part to your layout at the end of your entire UnitSpecific setup in addition to Phanx' gsub
__________________
  Reply With Quote
12-31-13, 06:06 AM   #54
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Originally Posted by MoonWitch View Post
I think all of us, because honestly : if you have showRaid set to true, oUF will always assume it's raid frames. If you then don't add
Lua Code:
  1. UnitSpecific.raid = UnitSpecific.party
your party frames will never use the party setup you've created. The frames you create from SpawnHeader are seen as raid frames.

So if you want to show your party frames in a raid and use SpawnHeader, add that UnitSpecific part to your layout at the end of your entire UnitSpecific setup in addition to Phanx' gsub
You still can have separate entries in UnitSpecific you just have to overwrite the unit in the style function. What I do is roughly like that:
lua Code:
  1. unit = frame:GetParent():GetName():find("^My_Party_Header_Name$") and "party" or unit

As to why one would want to show party frames when in raid:
1. Not interested in the raid as a whole (true for most non-healers. A numeric display for alive/dead raid members is sufficient)
2. The raid spreads out or phases based on group (easy to spot who's within range)
3. Use of partytargets (easy to track health on multiple targets, easy to switch targets, easy to see who's not on the focus target)
  Reply With Quote
12-31-13, 06:25 AM   #55
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Rainrider View Post
1. Not interested in the raid as a whole (true for most non-healers. A numeric display for alive/dead raid members is sufficient)
2. The raid spreads out or phases based on group (easy to spot who's within range)
3. Use of partytargets (easy to track health on multiple targets, easy to switch targets, easy to see who's not on the focus target)
1. Which class/spec has no dispel and no targetable utility (eg. Intervene) or combat buff (eg. Unholy Frenzy)?
2. Sort your raid frames by group for such encounters, rather than wasting space on duplicate frames.
3. Been playing since release, never wanted or needed party targets. Waste of screen space and attention. There are better ways to see who is targeting the wrong thing than scanning over a list of targets and manually evaluating whether each one is correct, and if you're not the raid leader it's none of your business anyway.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-31-13, 11:13 AM   #56
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
On my healer :
- Show me the frame when they're in range. If health is not good, cast heal. (Unless I am on MT duty, then seriously, only other essential healers will get one if I can afford it, else - sorry man.)
- Debuffed? Great, need to see if can fix.

On my dos (1 character, but still)
- Is the tank alive? No? I'll run to the door now.
- Just yell if more than 50% of my raid's dead. I'll assume wipe.

I know I sound like a prick there, but frankly, I just use very basic raid frames (Grid2), I don't even sort on anything but on group. (This to me is important for PoH) Every other method of sorting does weird things with my PoH and confuses me.
And I do keep my "prio list" pretty hard core. Generally, when I did toss several saving-your-life heals to others when I was on tank duty, I caused a wipe. So sorry, but a lot of folks are expendable.
__________________
  Reply With Quote
01-01-14, 09:55 PM   #57
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Originally Posted by Phanx View Post
1. Which class/spec has no dispel and no targetable utility (eg. Intervene) or combat buff (eg. Unholy Frenzy)?
2. Sort your raid frames by group for such encounters, rather than wasting space on duplicate frames.
3. Been playing since release, never wanted or needed party targets. Waste of screen space and attention. There are better ways to see who is targeting the wrong thing than scanning over a list of targets and manually evaluating whether each one is correct, and if you're not the raid leader it's none of your business anyway.
1. Hunter? (Master's Call and the exotic pet heal are not really a reason here. If you should have an tank pet for intervene, then spawn maintanks and add ora3 support for it.)
2. I will definitely not do encounter detection in my oUF layout
3. I like them when not in a raid

I do use raid frames and I don't show party frames when in raid for me personaly but I know there are people who do. I haven't even uploaded my layout on any popular addon site, as I don't have the time to provide support for it but why do I have to impose my layout decisions on others? Such a feature is a simple toggle in a config, so why not support it?
  Reply With Quote
01-06-14, 04:54 PM   #58
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
ok so I think I've got everything covered except group frames at this point. Also need to find a way to index the buff/debuff icons for !Beautycase

code

anyways will be uploading it here in a bit just gotta get a few more things ironed out
__________________
Tweets YouTube Website

Last edited by 10leej : 01-06-14 at 05:45 PM.
  Reply With Quote
01-06-14, 10:37 PM   #59
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by 10leej View Post
Also need to find a way to index the buff/debuff icons for !Beautycase
Somewhere:
Code:
local function Aura_PostCreateIcon(element, button)
	-- Do your thing with "button" here.
end
In your Spawn function:
Code:
Buffs.PostCreateIcon = Aura_PostCreateIcon
Debuffs.PostCreateIcon = Aura_PostCreateIcon
Feel free to look at oUF_Phanx to see exactly what I'm doing to skin the aura buttons. In particular, you will probably want to nuke the overlay texture, and remap its SetVertexColor method to color your border instead. You may also want to reparent some stuff to the cooldown model when it's shown, so it's easier to see.

Actually, I'll just post mine here so you don't have to dig around. Green parts are specific to my layout and/or border implementation.
Code:
local noop = function() end

local function AuraIconCD_OnShow(cd)
	-- Reparent the border textures and stack count to the cooldown so they're on top of it.
	local button = cd:GetParent()
	button:SetBorderParent(cd)
	button.count:SetParent(cd)
end

local function AuraIconCD_OnHide(cd)
	-- Reparent the border textures and stack count back to the button so they're not hidden.
	local button = cd:GetParent()
	button:SetBorderParent(button)
	button.count:SetParent(button)
end

local function AuraIconOverlay_SetBorderColor(overlay, r, g, b)
	-- Color the border instead of the unwanted overlay thingy.
	if not r or not g or not b then
		local color = ns.config.borderColor
		r, g, b = color[1], color[2], color[3]
	end
	overlay:GetParent():SetBorderColor(r, g, b)
end

function ns.PostCreateAuraIcon(element, button)
	-- A button is born! Do all the things!
	ns.CreateBorder(button, 12)

	button.cd:SetReverse(true)
	button.cd:SetScript("OnHide", AuraIconCD_OnHide)
	button.cd:SetScript("OnShow", AuraIconCD_OnShow)
	if button.cd:IsShown() then
		AuraIconCD_OnShow(button.cd)
	end

	button.icon:SetTexCoord(0.03, 0.97, 0.03, 0.97)

	button.overlay:Hide()
	button.overlay.Hide = AuraIconOverlay_SetBorderColor
	button.overlay.SetVertexColor = AuraIconOverlay_SetBorderColor
	button.overlay.Show = noop
end
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
01-06-14, 11:57 PM   #60
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
So then for the spawn function I just put it in like this?

Code:
oUF:RegisterStyle('Bob', Shared)
oUF:Factory(function(self)
        self:SetActiveStyle('Bob')
        self:Spawn('player'):SetPoint(unpack(cfg.player_position))
        self:Spawn('pet'):SetPoint(unpack(cfg.pet_position))
        self:Spawn('target'):SetPoint(unpack(cfg.target_position))
        self:Spawn('targettarget'):SetPoint(unpack(cfg.tot_position))
        self:Spawn('focus'):SetPoint(unpack(cfg.focus_position))
        self:Spawn('party'):SetPoint(unpack(cfg.group_position))
        self:Spawn('raid'):SetPoint(unpack(cfg.group_position))
        Buffs.PostCreateIcon = Aura_PostCreateIcon
        Debuffs.PostCreateIcon = Aura_PostCreateIcon
end)
And the other script put that wherever provided it's not in a function?

EDIT:
Tried it like that I get this error.
Code:
1x oUF_Bob-1\modules\units.lua:571: attempt to index global "Buffs" (a nil value)
oUF_Bob-1\modules\units.lua:571: in function "func"
oUF-1.6.5\factory.lua:20: in function <oUF\factory.lua:16>
(tail call): ?

Locals:
self = <unnamed> {
 0 = <userdata>
 PLAYER_LOGIN = <function> defined @Interface\AddOns\oUF\factory.lua:16
 active = true
}
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
 1 = <function> defined @Interface\AddOns\oUF_Bob\modules\units.lua:562
}
(for control) = 1
_ = 1
func = <function> defined @Interface\AddOns\oUF_Bob\modules\units.lua:562
_QUEUE = <table> {
 1 = <function> defined @Interface\AddOns\oUF_Bob\modules\units.lua:562
}
oUF = <table> {
 DisableBlizzard = <function> defined @Interface\AddOns\oUF\blizzard.lua:44
 SetActiveStyle = <function> defined @Interface\AddOns\oUF\ouf.lua:324
 EnableFactory = <function> defined @Interface\AddOns\oUF\factory.lua:38
 ColorGradient = <function> defined @Interface\AddOns\oUF\colors.lua:59
 SpawnHeader = <function> defined @Interface\AddOns\oUF\ouf.lua:496
 RegisterStyle = <function> defined @Interface\AddOns\oUF\ouf.lua:314
 AddElement = <function> defined @Interface\AddOns\oUF\ouf.lua:560
 Factory = <function> defined @Interface\AddOns\oUF\factory.lua:27
 RegisterMetaFunction = <function> defined @Interface\AddOns\oUF\ouf.lua:303
 Tags = <table> {
 }
 DisableFactory = <function> defined @Interface\AddOns\oUF\factory.lua:42
 objects = <table> {
 }
 colors = <table> {
 }
 version = "1.6.5"
 RunFactoryQueue = <function> defined @Interface\AddOns\oUF\factory.lua:46
 HandleUnit = <function> defined @Interface\AddOns\oUF\units.lua:8
 RegisterInitCallback = <function> defined @Interface\AddOns\oUF\ouf.lua:299
 IterateStyles = <function> defined @Interface\AddOns\oUF\ouf.lua:337
 Spawn = <function> defined @Interface\AddOns\oUF\ouf.lua:541
}
code

EDIT Again:
I'm an idiot didn't look at your example

AGAIN I'm an idiot:
Too stupid to figure it out.... even if I set my spawn function like this
Code:
oUF:RegisterStyle('Bob', Shared)
oUF:Factory(function(self)
	self:SetActiveStyle('Bob')
	self:Spawn('player'):SetPoint(unpack(cfg.player_position))
	self:Spawn('pet'):SetPoint(unpack(cfg.pet_position))
	self:Spawn('target'):SetPoint(unpack(cfg.target_position))
	self:Spawn('targettarget'):SetPoint(unpack(cfg.tot_position))
	self:Spawn('focus'):SetPoint(unpack(cfg.focus_position))
	self:Spawn('party'):SetPoint(unpack(cfg.group_position))
	self:Spawn('raid'):SetPoint(unpack(cfg.group_position))
	self.Buffs.PostCreateIcon = Aura_PostCreateIcon
	self.Debuffs.PostCreateIcon = Aura_PostCreateIcon
end)
I still get that same error...

Eh base frames seem to be working alright here's an upload for people to download and rage at me.
Click for bacon
__________________
Tweets YouTube Website

Last edited by 10leej : 01-07-14 at 12:28 PM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Trying my hand at ouf


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