Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-06-13, 08:57 PM   #1
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
More oUF troubles!

I've been working on my raid frame layout recently, and I got it working fine until I wanted to make it do different things depending on size. Some quick google-fu led me to this thread, which while outdated still seemed fairly informative and solid.

So I tried to look at oUF_Diablo's current code, and the same method is still used. I tried to copy it over almost completely, with slight changes to values etc so it'd fit my layout. This is probably where it broke.

While I don't fully understand everything that goes on in zork's code, I do think I managed to port it over fairly well, but somewhere along the way it must've took a dark turn because they now spawn twice! I have two raidframes spawning, in both places I'd like, only they spawn no matter what. They spawn under my player frame even if I do 25man, and they spawn in the top left corner even if I'm in a 10man group. Nothing seems to change this.

This is the code I've shamelessly stolen and butchered.
lua Code:
  1. oUF:RegisterStyle('opRaidDPS', Shared)
  2. oUF:SetActiveStyle('opRaidDPS')
  3.  
  4. local playerClass = select(3, UnitClass('player'))
  5. local raid, group, i, j
  6. -- Single Frames   
  7.  
  8. local attr = {
  9.     visibility1 = "custom [@raid11,exists] hide;[group:raid] show; hide",       --use "party,raid" to show this in party aswell
  10.     visibility2 = "custom [@raid26,exists] hide; [@raid11,exists] show; hide"--special display for raid > 20 players (lower scale)
  11.     visibility3 = "custom [@raid26,exists] show; hide",                         --special display for raid > 30 players (lower scale)
  12. }
  13.  
  14. local function getRaidVisibility(id)
  15.     if id == 1 then
  16.         return attr.visibility1
  17.     elseif id == 2 then
  18.         return attr.visibility2
  19.     else
  20.         return attr.visibility3
  21.     end
  22. end  
  23.  
  24. for i=1, 3 do
  25.     raid = {}
  26.     for j=1, NUM_RAID_GROUPS do
  27.         local name = "oUF_OpieRaid"..i.."Group"..j
  28.         group = oUF:SpawnHeader(
  29.             name,
  30.             nil,
  31.             getRaidVisibility(i),
  32.             'showPlayer', true,
  33.             'showSolo', true,
  34.             'showParty', false,
  35.             'showRaid', true,
  36.             'yOffset', -4,
  37.             'maxColumns', 8,
  38.             'unitsPerColumn', 5,
  39.             "groupFilter", tostring(j),
  40.             'groupBy', 'GROUP',
  41.             'groupingOrder', "1,2,3,4,5,6,7,8",
  42.             'columnSpacing', 3,
  43.             'columnAnchorPoint', 'LEFT',
  44.                 'oUF-initialConfigFunction', ([[
  45.                         self:SetHeight(24)
  46.                         self:SetWidth(78)
  47.                 ]])
  48.         )          
  49.         if j == 1 then
  50.             group:SetPoint('TOP', oUF_opUnitFramesPlayer, 'BOTTOM', 0, -10)
  51.         else
  52.             if playerClass == 9 or playerClass == 3 or playerClass == 6 then
  53.                 group:SetPoint('TOPLEFT', UIParent, 'TOPLEFT', 5, -28)
  54.             else
  55.                 group:SetPoint('TOPLEFT', UIParent, 'TOPLEFT', 5, -5)
  56.             end
  57.         end
  58.         raid[j] = group
  59.     end
  60. end

Here's my full layout: http://pastebin.com/NHTi6ePR
Here's Zork's layout: https://code.google.com/p/rothui/sou...s/raid.lua#365

Thanks in advance!

EDIT: I'd like to also point out that I tried to use this page for documentation on the header API, but I can't find any good documentation on the visibility stuff. If anyone's got a better page for it, I'd welcome it with open arms.
__________________
All I see is strobe lights blinding me in my hindsight.

Last edited by Wimpface : 10-06-13 at 09:03 PM.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » More oUF troubles!


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