WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   different layout depend on how many party member in group? (https://www.wowinterface.com/forums/showthread.php?t=54796)

devilArt 11-05-16 06:57 AM

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 :D

Phanx 11-07-16 05:15 AM

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")


devilArt 11-07-16 04:03 PM

Quote:

Originally Posted by Phanx (Post 320704)
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 :cool:


All times are GMT -6. The time now is 04:40 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI