Thread Tools Display Modes
08-19-16, 12:30 AM   #1
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Questions about "SecureGroupHeaders"

Hi all,

I would like to ask some questions regarding "SecureGroupHeaders" template.

So, I was trying to make raid frames with oUF, but seems like these questions are more related to "SecureGroupHeaders" template and its configuration attributes.

Here's what it currently looks like:


* Name texts are hidden at the moement

and here's a code:

Lua Code:
  1. C.Raid26to40 = oUF:SpawnHeader(
  2.     "Raid26to40",
  3.     nil,
  4.     "custom [@raid26, exists] show; hide",
  5.     -- attributes
  6.     "initial-width", G["unitframe"]["raid"]["width"],
  7.     "initial-height", G["unitframe"]["raid"]["height"],
  8.     "oUF-initialConfigFunction", [[
  9.         local header = self:GetParent();
  10.         self:SetWidth(header:GetAttribute("initial-width"));
  11.         self:SetHeight(header:GetAttribute("initial-height"));
  12.     ]],
  13.     "showRaid", true,
  14.     "showParty", false,
  15.     "showPlayer", true,
  16.     "showSolo", false,
  17.     "point", "LEFT",
  18.     "xOffset", 8,
  19.     "maxColumns", 8,
  20.     "unitsPerColumn", 5,
  21.     "columnAnchorPoint", "TOP",
  22.     "columnSpacing", 8,
  23.     "groupBy", "GROUP",
  24.     "groupFilter", "1,2,3,4,5,6,7,8",
  25.     "groupingOrder", "1,2,3,4,5,6,7,8"
  26. );
  27. C.Raid26to40:SetPoint(unpack(G["unitframe"]["raid"]["point"]));

1. So, each column represents each group (or party), but once the player leaves or joins a raid group, the order just gets messed up.
(For example, when the member from Group 4 leaves, all other raid members behind that person gets pushed forward. So, even a person from Group 5 is forcibly displayed on Group 4...)

2. Just like a default raid frames, I would like make each group grows vertically rather than the one shown above, but I ain't sure where or which configuration attribute I should actually modify to achieve this.

(EXTRA) 3. Would there be any possible way to count the size of such table?

Lua Code:
  1. local table = {};
  2. table.ABC = "ABC";
  3. table.DEF = "DEF";
  4. table.GHI = "GHI";

I've tried with #table and select("#", table), but none of them seemed to be working.
  Reply With Quote
08-19-16, 01:55 AM   #2
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by Layback_ View Post
Hi all,

I would like to ask some questions regarding "SecureGroupHeaders" template.

So, I was trying to make raid frames with oUF, but seems like these questions are more related to "SecureGroupHeaders" template and its configuration attributes.

Here's what it currently looks like:


* Name texts are hidden at the moement

and here's a code:

Lua Code:
  1. C.Raid26to40 = oUF:SpawnHeader(
  2.     "Raid26to40",
  3.     nil,
  4.     "custom [@raid26, exists] show; hide",
  5.     -- attributes
  6.     "initial-width", G["unitframe"]["raid"]["width"],
  7.     "initial-height", G["unitframe"]["raid"]["height"],
  8.     "oUF-initialConfigFunction", [[
  9.         local header = self:GetParent();
  10.         self:SetWidth(header:GetAttribute("initial-width"));
  11.         self:SetHeight(header:GetAttribute("initial-height"));
  12.     ]],
  13.     "showRaid", true,
  14.     "showParty", false,
  15.     "showPlayer", true,
  16.     "showSolo", false,
  17.     "point", "LEFT",
  18.     "xOffset", 8,
  19.     "maxColumns", 8,
  20.     "unitsPerColumn", 5,
  21.     "columnAnchorPoint", "TOP",
  22.     "columnSpacing", 8,
  23.     "groupBy", "GROUP",
  24.     "groupFilter", "1,2,3,4,5,6,7,8",
  25.     "groupingOrder", "1,2,3,4,5,6,7,8"
  26. );
  27. C.Raid26to40:SetPoint(unpack(G["unitframe"]["raid"]["point"]));

1. So, each column represents each group (or party), but once the player leaves or joins a raid group, the order just gets messed up.
(For example, when the member from Group 4 leaves, all other raid members behind that person gets pushed forward. So, even a person from Group 5 is forcibly displayed on Group 4...)

2. Just like a default raid frames, I would like make each group grows vertically rather than the one shown above, but I ain't sure where or which configuration attribute I should actually modify to achieve this.

(EXTRA) 3. Would there be any possible way to count the size of such table?

Lua Code:
  1. local table = {};
  2. table.ABC = "ABC";
  3. table.DEF = "DEF";
  4. table.GHI = "GHI";

I've tried with #table and select("#", table), but none of them seemed to be working.
Heres what i've been using hope it helps in some way

Lua Code:
  1. local Aftermathh_Raid25 = oUF:SpawnHeader(nil, nil, "solo,party,raid",
  2.     "showPlayer", true,
  3.     "showRaid", true,
  4.     "showParty", true,
  5.     "showSolo", true,
  6.     "xoffset", 4,
  7.     "yOffset", -4,
  8.     "point", "LEFT",
  9.     "columnAnchorPoint", "TOP",
  10.     "groupFilter", "1,2,3,4,5,6,7,8",
  11.     "groupingOrder", "1,2,3,4,5,6,7,8",
  12.     "groupBy", "GROUP",
  13.     "sortMethod", "GROUP",
  14.     "maxColumns", 8,
  15.     "unitsPerColumn", 5,
  16.     "columnSpacing", 4,
  17.     "oUF-initialConfigFunction", [[
  18.         self:SetWidth(62)
  19.         self:SetHeight(40)
  20.         self:SetScale(1)
  21.     ]]
  22. )
  23. Aftermathh_Raid25:SetPoint("LEFT", UIParent, 221, 15)
  Reply With Quote
08-19-16, 03:41 AM   #3
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
1. I believe you need to create one header for each group to achieve this functionality.

2. Don't know. There'll be an attribute for that.

3. No shortcut. Use pairs to count all entries.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
08-19-16, 06:58 AM   #4
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Thanks for both replies, Game92 and Lombra.

Just made some modifications based on Lombra's advice and works like charm

2nd question was also resolved!

Last edited by Layback_ : 08-19-16 at 07:06 AM.
  Reply With Quote
08-19-16, 07:39 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You can find a full list of secure group header attributes with descriptions in SecureGroupHeaders.lua:
https://www.townlong-yak.com/framexm...Headers.lua#24
__________________
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
08-19-16, 10:07 PM   #6
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by Phanx View Post
You can find a full list of secure group header attributes with descriptions in SecureGroupHeaders.lua:
https://www.townlong-yak.com/framexm...Headers.lua#24
Hi Phanx,

yeah, I'm aware of that, but was unsure of which attribute I should have modified.

Probably I was scared of doin some experiments and failing ...

Thank you for reply anyways!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Questions about "SecureGroupHeaders"


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