Thread Tools Display Modes
11-05-16, 06:57 AM   #1
devilArt
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 51
different layout depend on how many party member in group?

hey guys
I want to use different layouts on 5 men party, 10 men raid, and 25 men raid

something like this

Lua Code:
  1. if member < 6 then -- in party
  2.     do some style to layout
  3. elseif member >5 and member < 11 then -- in raid
  4.     do some style to layout
  5. end


is there some easy way to do this?
I tried read elvui's code, but my skill is really poor, cant understand at all~~
can you guys show me some simple and easy example
thanks in advance
  Reply With Quote
11-07-16, 05:15 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
The simplest way would be to spawn 3 different headers, one for each group type, and use a visibility conditional on each one so that it was only shown in the desired group type.

For example:

Code:
local party = oUF:SpawnHeader("oUF_MyLayout_Party", nil,
    "custom [nogroup][group:party,@party1,noexists][group:raid,@raid6,exists]hide;show")

local raid10 = oUF:SpawnHeader("oUF_MyLayout_Raid10", nil,
    "custom [nogroup][group:party][@raid6,noexists][@raid11,exists]hide;show")

local raid25 = oUF:SpawnHeader("oUF_MyLayout_Raid25", nil,
    "custom [nogroup][group:party][@raid11,noexists]hide;show")
__________________
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
11-07-16, 04:03 PM   #3
devilArt
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 51
Originally Posted by Phanx View Post
The simplest way would be to spawn 3 different headers, one for each group type, and use a visibility conditional on each one so that it was only shown in the desired group type.

For example:

Code:
local party = oUF:SpawnHeader("oUF_MyLayout_Party", nil,
    "custom [nogroup][group:party,@party1,noexists][group:raid,@raid6,exists]hide;show")

local raid10 = oUF:SpawnHeader("oUF_MyLayout_Raid10", nil,
    "custom [nogroup][group:party][@raid6,noexists][@raid11,exists]hide;show")

local raid25 = oUF:SpawnHeader("oUF_MyLayout_Raid25", nil,
    "custom [nogroup][group:party][@raid11,noexists]hide;show")
this is exactly what I looking for
thanks phanx
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » different layout depend on how many party member in group?

Thread Tools
Display Modes

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