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:
oUF:RegisterStyle('opRaidDPS', Shared)
oUF:SetActiveStyle('opRaidDPS')
local playerClass = select(3, UnitClass('player'))
local raid, group, i, j
-- Single Frames
local attr = {
visibility1 = "custom [@raid11,exists] hide;[group:raid] show; hide", --use "party,raid" to show this in party aswell
visibility2 = "custom [@raid26,exists] hide; [@raid11,exists] show; hide", --special display for raid > 20 players (lower scale)
visibility3 = "custom [@raid26,exists] show; hide", --special display for raid > 30 players (lower scale)
}
local function getRaidVisibility(id)
if id == 1 then
return attr.visibility1
elseif id == 2 then
return attr.visibility2
else
return attr.visibility3
end
end
for i=1, 3 do
raid = {}
for j=1, NUM_RAID_GROUPS do
local name = "oUF_OpieRaid"..i.."Group"..j
group = oUF:SpawnHeader(
name,
nil,
getRaidVisibility(i),
'showPlayer', true,
'showSolo', true,
'showParty', false,
'showRaid', true,
'yOffset', -4,
'maxColumns', 8,
'unitsPerColumn', 5,
"groupFilter", tostring(j),
'groupBy', 'GROUP',
'groupingOrder', "1,2,3,4,5,6,7,8",
'columnSpacing', 3,
'columnAnchorPoint', 'LEFT',
'oUF-initialConfigFunction', ([[
self:SetHeight(24)
self:SetWidth(78)
]])
)
if j == 1 then
group:SetPoint('TOP', oUF_opUnitFramesPlayer, 'BOTTOM', 0, -10)
else
if playerClass == 9 or playerClass == 3 or playerClass == 6 then
group:SetPoint('TOPLEFT', UIParent, 'TOPLEFT', 5, -28)
else
group:SetPoint('TOPLEFT', UIParent, 'TOPLEFT', 5, -5)
end
end
raid[j] = group
end
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.