Reply
Thread Tools Display Modes
Unread 03-23-14, 09:10 PM   #1
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 428
Raid frames not working?

I'm sure it's something simple on my part but my raid frames don't work. I only get the first group. I'd also like to know how to range them horizontally, and even add aura filters if anyone is willing for extra credit.

group code:
https://code.google.com/p/bobui/sour...ules/group.lua

config:
https://code.google.com/p/bobui/sour...Bob/config.lua
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	57
Size:	168.2 KB
ID:	8047  

Last edited by 10leej : 03-23-14 at 09:13 PM.
10leej is offline   Reply With Quote
Unread 03-24-14, 03:14 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,351
Read: http://wowprogramming.com/docs/secur.../Group_Headers
It describes most of the options.

You are not using custom conditions which is fine. But if you do not use them make sure to activate "showRaid = true" if you want to display raidframes aswell.

Additionally. Make sure to never call SetScale/SetWidth/SetHeight on a group header unit button. Otherwise incase you are in combat and a group header unit is spawned your layout will grab a taint.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline   Reply With Quote
Unread 03-24-14, 12:34 PM   #3
Pyrates
A Theradrim Guardian
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 68
Hmmm, so what does one do then to change the size of header unit buttons after they're spawned? Or is the trick to make sure you're not in combat for the change?
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."
Pyrates is offline   Reply With Quote
Unread 03-24-14, 03:45 PM   #4
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 428
Originally Posted by zork View Post
You are not using custom conditions which is fine. But if you do not use them make sure to activate "showRaid = true" if you want to display raidframes aswell.
Thanks Zork! I figured it was something simple like that...

Now to get them to spawn horizontally and get the auras working. I should be able to use Aurawatch for that but there's not a lot of documentation for that anyone now a good example?

Last edited by 10leej : 03-24-14 at 03:51 PM.
10leej is offline   Reply With Quote
Unread 03-24-14, 05:23 PM   #5
Rainrider
A Rage Talon Dragon Guard
Join Date: Nov 2008
Posts: 315
Originally Posted by Pyrates View Post
Hmmm, so what does one do then to change the size of header unit buttons after they're spawned? Or is the trick to make sure you're not in combat for the change?
You pass the size to the oUF-initialConfigFunction attribute when you define the header. Something like
Code:
local header = SpawnHeader("PartyHeader", nil, "party",
    "showParty", true,
    "oUF-initialConfigFunction", format("self:SetSize(%d, %d)", cfg.headerWidth, cfg.headerHeight)
)
@10leej
You could spawn a header for every raid group separately instead of one for the whole raid. unitsPerColumn would then be 1 instead of 5 and you'll have to use "groupFilter" to tell the header which raid group to display.
Rainrider is offline   Reply With Quote
Unread 03-24-14, 05:52 PM   #6
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 428
Originally Posted by Rainrider View Post
You could spawn a header for every raid group separately instead of one for the whole raid. unitsPerColumn would then be 1 instead of 5 and you'll have to use "groupFilter" to tell the header which raid group to display.
So then just do something like this?
Lua Code:
  1. local party = self:SpawnHeader(nil, nil, 'raid,party',
  2.     'groupFilter', 1, --Groups 1-8 set manually
  3.     'showPlayer', true,
  4.     'yOffset', cfg.group.offsety,
  5.     'maxColumns', 5,
  6.     'unitsPerColumn', 1,
  7.     'columnAnchorPoint', cfg.group.growth,
  8.     'sortMethod', cfg.group.sortmethod,
  9.     'groupBy', cfg.group.groupby,
  10.     'columnSpacing', cfg.group.offsetx,
  11.     'oUF-initialConfigFunction', [[
  12.         self:SetWidth(45)
  13.         self:SetHeight(50)
  14.     ]]
  15. )
10leej is offline   Reply With Quote
Unread 03-25-14, 02:56 AM   #7
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,351
Here is what I do for now:
Lua Code:
  1. if cfg.units.raid.show then
  2.  
  3.     --register style
  4.     oUF:RegisterStyle("diablo:raid", createStyle)
  5.     oUF:SetActiveStyle("diablo:raid")
  6.  
  7.     local attr = cfg.units.raid.attributes
  8.  
  9.     local raidDragFrame = CreateFrame("Frame", "oUF_DiabloRaidDragFrame", UIParent)
  10.     raidDragFrame:SetSize(50,50)
  11.     raidDragFrame:SetPoint(cfg.units.raid.pos.a1,cfg.units.raid.pos.af,cfg.units.raid.pos.a2,cfg.units.raid.pos.x,cfg.units.raid.pos.y)
  12.     func.applyDragFunctionality(raidDragFrame)
  13.     table.insert(oUF_Diablo_Units,"oUF_DiabloRaidDragFrame") --add frames to the slash command function
  14.  
  15.     local groups, group = {}, nil
  16.    
  17.     for i=1, NUM_RAID_GROUPS do
  18.       local name = "oUF_DiabloRaidGroup"..i
  19.       group = oUF:SpawnHeader(
  20.         name,
  21.         nil,
  22.         attr.visibility,
  23.         "showPlayer",         attr.showPlayer,
  24.         "showSolo",           attr.showSolo,
  25.         "showParty",          attr.showParty,
  26.         "showRaid",           attr.showRaid,
  27.         "point",              attr.point,
  28.         "yOffset",            attr.yOffset,
  29.         "xoffset",            attr.xoffset,
  30.         "groupFilter",        tostring(i),
  31.         "unitsPerColumn",     5,
  32.         --"unitsPerColumn",     attr.unitsPerColumn,
  33.         --"columnSpacing",      attr.columnSpacing,
  34.         --"columnAnchorPoint",  attr.columnAnchorPoint,
  35.         "oUF-initialConfigFunction", ([[
  36.           self:SetWidth(%d)
  37.           self:SetHeight(%d)
  38.         ]]):format(128, 64)
  39.       )
  40.       if i == 1 then
  41.         group:SetPoint("TOPLEFT",raidDragFrame,0,0)
  42.       else
  43.         if attr.columnAnchorPoint == "TOP" then
  44.           group:SetPoint("TOPLEFT", groups[i-1], "BOTTOMLEFT", 0, attr.columnSpacing)
  45.         elseif attr.columnAnchorPoint == "BOTTOM" then
  46.           group:SetPoint("BOTTOMLEFT", groups[i-1], "TOPLEFT", 0, attr.columnSpacing)
  47.         elseif attr.columnAnchorPoint == "LEFT" then
  48.           group:SetPoint("TOPLEFT", groups[i-1], "TOPRIGHT", attr.columnSpacing, 0)
  49.         else
  50.           group:SetPoint("TOPRIGHT", groups[i-1], "TOPLEFT", attr.columnSpacing, 0)
  51.         end
  52.       end
  53.       groups[i] = group
  54.     end
  55.  
  56.     local updateRaidScale = CreateFrame("Frame")
  57.     updateRaidScale:RegisterEvent("GROUP_ROSTER_UPDATE")
  58.     updateRaidScale:RegisterEvent("PLAYER_ENTERING_WORLD")
  59.     updateRaidScale:SetScript("OnEvent", function(self)
  60.       if(InCombatLockdown()) then
  61.         self:RegisterEvent("PLAYER_REGEN_ENABLED")
  62.       else
  63.         self:UnregisterEvent("PLAYER_REGEN_ENABLED")
  64.         local num = GetNumGroupMembers()
  65.         local scale = (100-num)/100*cfg.units.raid.scale
  66.         for idx, group in pairs(groups) do
  67.           if group then
  68.             group:SetScale(scale)
  69.           end
  70.         end
  71.       end
  72.     end)    
  73.    
  74.   end

So I check for out of combat and do my adjustments if needed.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 03-25-14 at 03:05 AM.
zork is offline   Reply With Quote
Unread 03-25-14, 05:13 AM   #8
Rainrider
A Rage Talon Dragon Guard
Join Date: Nov 2008
Posts: 315
Originally Posted by 10leej View Post
So then just do something like this?
Lua Code:
  1. local party = self:SpawnHeader(nil, nil, 'raid,party',
  2.     'groupFilter', 1, --Groups 1-8 set manually
  3.     'showPlayer', true,
  4.     'yOffset', cfg.group.offsety,
  5.     'maxColumns', 5,
  6.     'unitsPerColumn', 1,
  7.     'columnAnchorPoint', cfg.group.growth,
  8.     'sortMethod', cfg.group.sortmethod,
  9.     'groupBy', cfg.group.groupby,
  10.     'columnSpacing', cfg.group.offsetx,
  11.     'oUF-initialConfigFunction', [[
  12.         self:SetWidth(45)
  13.         self:SetHeight(50)
  14.     ]]
  15. )
You obviously need a loop and use the iterator index instead of setting the groupFilter manually 8 times. You also need to separate your party header from your raid group headers, as you don't want "showPlayer" for the raid header (it will display the player in every raid group) and "groupFilter" will prevent your party frames from spawning (I believe, haven't tested though).
Rainrider is offline   Reply With Quote
Unread 03-25-14, 01:11 PM   #9
Pyrates
A Theradrim Guardian
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 68
Originally Posted by Rainrider View Post
You pass the size to the oUF-initialConfigFunction attribute when you define the header. Something like
Code:
local header = SpawnHeader("PartyHeader", nil, "party",
    "showParty", true,
    "oUF-initialConfigFunction", format("self:SetSize(%d, %d)", cfg.headerWidth, cfg.headerHeight)
)
Thanks. But that does not effect the unit buttons already spawned.
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."

Last edited by Pyrates : 03-25-14 at 01:16 PM.
Pyrates is offline   Reply With Quote
Unread 03-25-14, 05:27 PM   #10
Rainrider
A Rage Talon Dragon Guard
Join Date: Nov 2008
Posts: 315
Yep, moving and sizing of secure frames only out of combat
Rainrider is offline   Reply With Quote
Unread 03-30-14, 05:20 PM   #11
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 428
So got them working for the most part but not when someone enters/leaves combat I run accross this issue



updated the links above with new code
10leej is offline   Reply With Quote
Reply

Go BackWoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Raid frames not working?

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