Thread Tools Display Modes
04-26-11, 06:17 PM   #1
frohanss
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 40
Raid layout based on size

I was planing on making a layout that changes (show/hide) based on raid size.
So just woundering if i am on the right track with this:

Basicly whant 1 layout for 6-10man, 1 for 11-25man and another for 26+.

Will it be correct to use something like:

Code:
local raid10 = oUF:SpawnHeader("oUF_Raid10", nil, "custom [@raid11,noexists][@raid6,exists] show;hide",

local raid25 = oUF:SpawnHeader("oUF_Raid25", nil, "custom [@raid26,noexists][@raid11,exists] show;hide",

local raid40 = oUF:SpawnHeader("oUF_Raid40", nil, "custom [@raid26,exists] show;hide",
Will it work? I will test it out tomorrow some time, but cool if some can confirm or correct this.
  Reply With Quote
04-27-11, 01:42 PM   #2
Crissa
A Flamescale Wyrmkin
 
Crissa's Avatar
Join Date: May 2008
Posts: 136
Interested in the answer.

-Crissa
  Reply With Quote
04-28-11, 07:20 AM   #3
frohanss
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 40
Seem's to work

Have only made a simple test for only 2 layouts. 10man and 10man+.
Will test more out when i have time todo bg's and stuff so i can check higher raid numbers.

Using:

Code:
	local raid10 = oUF:SpawnHeader("oUF_Raid10", nil, "custom [@raid11,noexists] show;hide",
		"showRaid", true,  
		"showPlayer", true,
		"showSolo", cfg.RaidShowSolo,
		"showParty", cfg.ShowParty,
		"xoffset", 15,
		"yOffset", -15,
		"groupFilter", "1,2,3,4,5,6,7,8",
		"groupBy", "GROUP",
		"groupingOrder", "1,2,3,4,5,6,7,8",
		"sortMethod", "INDEX",
		"maxColumns", maxGroups,
		"unitsPerColumn", 5,
		"columnSpacing", 15,
		"point", "LEFT",
		"columnAnchorPoint", "TOP",
		"oUF-initialConfigFunction", ([[
		self:SetWidth(%d)
		self:SetHeight(%d)
		]]):format(cfg.RHwidth, cfg.RHheight))
		raid10:SetPoint("BOTTOM", UIParent, 0, 85)
		CompactRaidFrameContainer:Hide() 
		CompactRaidFrameManager:SetAlpha(0)
	local raid25 = oUF:SpawnHeader("oUF_Raid25", nil, "custom [@raid11,exists] show;hide",
		"showRaid", true,  
		"showPlayer", true,
		"showSolo", cfg.RaidShowSolo,
		"showParty", cfg.ShowParty,
		"xoffset", 15,
		"yOffset", -15,
		"groupFilter", "1,2,3,4,5,6,7,8",
		"groupBy", "GROUP",
		"groupingOrder", "1,2,3,4,5,6,7,8",
		"sortMethod", "INDEX",
		"maxColumns", maxGroups,
		"unitsPerColumn", 5,
		"columnSpacing", 15,
		"point", "LEFT",
		"columnAnchorPoint", "Bottom",
		"oUF-initialConfigFunction", ([[
		self:SetWidth(%d)
		self:SetHeight(%d)
		]]):format(40, 25))
		raid25:SetPoint("BOTTOMLEFT", UIParent, 10, 210)
		CompactRaidFrameContainer:Hide() 
		CompactRaidFrameManager:SetAlpha(0)
Atm my power bar messes up and keeps uses the size from 10man.

So i just made a simple raid size check. Anyone know a better way todo this?
Like setting width to health bar's width?

Code:
	if f.mystyle == "raid" then
		local h = CreateFrame("Frame", nil, s)
		------Size check
		local numpeeps --Number of people in the group.
		local InBGFrame = CreateFrame("FRAME", "FooAddonFrame");
		InBGFrame:RegisterEvent("PARTY_MEMBERS_CHANGED");

		local function eventHandler(self, event, ...)
		numpeeps = GetNumRaidMembers();
		if (numpeeps == 0 ) then --Not in a raid
		s:SetWidth(1)
		elseif (numpeeps < 11 ) then --10man
		s:SetWidth(cfg.RHwidth)
		s:SetPoint("BOTTOM",f,"BOTTOM",0,5)
		elseif (numpeeps > 10) then --Above 10man
		s:SetWidth(40)
		s:SetPoint("BOTTOM",f,"BOTTOM",0,-10)
		else --For 25+ when i get that far.

		end
	end
	InBGFrame:SetScript("OnEvent", eventHandler);
---------Size check ends
Update: Atm i seem to have a bit trouble with mixing the size check. Like: "custom [@raid26,noexists][@raid11,exists] show;hide"
So help on that would be nice.

Last edited by frohanss : 04-28-11 at 07:40 AM.
  Reply With Quote
04-30-11, 04:20 PM   #4
Goldpaw
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 56
6-10: "custom [@raid11,exists] hide; [@raid6,exists] show; hide"
11-25: "custom [@raid26,exists] hide; [@raid11,exists] show; hide"
26+: "custom [@raid26,exists] show; hide"
  Reply With Quote
05-03-11, 06:41 AM   #5
frohanss
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 40
Originally Posted by Goldpaw View Post
6-10: "custom [@raid11,exists] hide; [@raid6,exists] show; hide"
11-25: "custom [@raid26,exists] hide; [@raid11,exists] show; hide"
26+: "custom [@raid26,exists] show; hide"
Thank you so much. Didn't know i could combine them that way. Nice nice
  Reply With Quote
05-25-11, 02:04 PM   #6
Sauerkraut
A Wyrmkin Dreamwalker
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 52
I seem to be having some trouble with getting my Raid10 to spawn. The 25 and 40 are working fine. I followed your directions. If I throw in a Raid10
(6-10: "raid10,custom [@raid11,exists] hide; [@raid6,exists] show; hide") it spawns but it stays spawned when the 25/40 spawns. Any ideas?
  Reply With Quote
05-25-11, 03:02 PM   #7
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Check oUF_Simple. I made some examples.
__________________
| 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
05-25-11, 05:23 PM   #8
Sauerkraut
A Wyrmkin Dreamwalker
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 52
Thanks Zork I'll see if it works.

Works perfectly!! Thank You!

Last edited by Sauerkraut : 05-25-11 at 09:26 PM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Raid layout based on size


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