A Flamescale Wyrmkin
Join Date: Oct 2007
Posts: 103
|
Originally Posted by Yhor
With an oUF layout, I'd have to exit game, make whatever adjustments (edit the code or swap for a modified layout)... then I could log onto a class that I benefited from doing this. In order to not have that functionality for a class that has no use for it, I'd have to repeat the process...
|
Nothing stopping you from setting up a table like :
Code:
oUF.indicators={
buffs = {
["Grace"] = {"1A7AAF","6AB8EC","ffffff"},
["PoM"] = {"528EFF","43F3C6","45E836","8ADD2A","D0D21F","C69F15"},
["Lifebloom"] = {"A7FD0A","6AB8EC","ffffff"},
},
fonts = {
["DEFAULT"] = {
offsets = {x = 0, y = 0},
size = 8.5,
name = "Interface\\Addons\\oUF_Tags\\media\\visitor.ttf",
outline = "OUTLINE",
alignH = "CENTER",
},
["TOPLEFT"] = {
offsets = {x = 0, y = 3},
size = 8.5,
name = "Interface\\Addons\\oUF_Tags\\media\\visitor.ttf",
outline = "OUTLINE",
alignH = "LEFT",
},
["TOP"] = {
offsets = {x = 0, y = 3},
size = 8.5,
name = "Interface\\Addons\\oUF_Tags\\media\\visitor.ttf",
outline = "OUTLINE",
alignH = "CENTER",
},
["TOPRIGHT"] = {
offsets = {x = 3, y = 3},
size = 8.5,
name = "Interface\\Addons\\oUF_Tags\\media\\visitor.ttf",
outline = "OUTLINE",
alignH = "RIGHT",
},
["LEFT"] = {
offsets = {x = 0, y = 0},
size = 8.5,
name = "Interface\\Addons\\oUF_Tags\\media\\visitor.ttf",
outline = "OUTLINE",
alignH = "LEFT",
},
["CENTER"] = {
offsets = {x = 0, y = 0},
size = 8.5,
name = "Interface\\Addons\\oUF_Tags\\media\\visitor.ttf",
outline = "OUTLINE",
alignH = "CENTER",
},
["RIGHT"] = {
offsets = {x = 3, y = 0},
size = 8.5,
name = "Interface\\Addons\\oUF_Tags\\media\\visitor.ttf",
outline = "OUTLINE",
alignH = "RIGHT",
},
["BOTTOMLEFT"] = {
offsets = {x = 0, y = -3},
size = 8.5,
name = "Interface\\Addons\\oUF_Tags\\media\\visitor.ttf",
outline = "OUTLINE",
alignH = "LEFT",
},
["BOTTOM"] = {
offsets = {x = 0, y = -3},
size = 8.5,
name = "Interface\\Addons\\oUF_Tags\\media\\visitor.ttf",
outline = "OUTLINE",
alignH = "CENTER",
},
["BOTTOMRIGHT"] = {
offsets = {x = 3, y = -3},
size = 8.5,
name = "Interface\\Addons\\oUF_Tags\\media\\visitor.ttf",
outline = "OUTLINE",
alignH = "RIGHT",
},
},
class = {
DEATHKNIGHT = {
["TOP"] = "",
["TOPLEFT"] = "[tree]",
["TOPRIGHT"] = "[gotw]",
["BOTTOMLEFT"] = "[lb]",
["BOTTOMRIGHT"] = "[rejuv][regrow][flour]"
},
DRUID = {
["TOP"] = "",
["TOPLEFT"] = "[tree]",
["TOPRIGHT"] = "[gotw]",
["BOTTOMLEFT"] = "[lb]",
["BOTTOMRIGHT"] = "[rejuv][regrow][flour]"
},
PRIEST = {
["TOP"] = "[painsupress][powerinfusion][guardspirit][twilighttorment]",
["TOPLEFT"] = "[pws][ws][aegis]",
["TOPRIGHT"] = "[spirit][shad][fort][fear]",
["BOTTOMLEFT"] = "[inspiration][grace][pom]",
["BOTTOMRIGHT"] = "[rnw][gotn][rejuv][regrow][flour]"
},
PALADIN = {
["TOP"] = "",
["TOPLEFT"] = "",
["TOPRIGHT"] = "",
["BOTTOMLEFT"] = "",
["BOTTOMRIGHT"] = ""
},
SHAMAN = {
["TOP"] = "",
["TOPLEFT"] = "",
["TOPRIGHT"] = "",
["BOTTOMLEFT"] = "",
["BOTTOMRIGHT"] = ""
},
WARLOCK = {
["TOP"] = "",
["TOPLEFT"] = "",
["TOPRIGHT"] = "",
["BOTTOMLEFT"] = "",
["BOTTOMRIGHT"] = ""
},
MAGE = {
["TOP"] = "",
["TOPLEFT"] = "",
["TOPRIGHT"] = "",
["BOTTOMLEFT"] = "",
["BOTTOMRIGHT"] = ""
},
ROGUE = {
["TOP"] = "",
["TOPLEFT"] = "",
["TOPRIGHT"] = "",
["BOTTOMLEFT"] = "",
["BOTTOMRIGHT"] = ""
}
}
}
Since haste implemented that tag feature, i have this table setup in a seperate module for my layouts.
For example, the tag in their for my priest : '[painsupress]'
is eventually thrown into a fontstring when the frame is built .
Code:
function createIndicatorGroup(object,anchor,objectAnchor,fontDB, tags)
group = objectAnchor:CreateFontString(nil, "OVERLAY")
group:SetFont(fontDB.name, fontDB.size, fontDB.outline)
group:SetPoint(anchor, objectAnchor, anchor, fontDB.offsets.x, fontDB.offsets.y)
group:SetJustifyH(fontDB.alignH)
object:Tag(group,tags)
group:Show()
return group
end
function generateAuraGroups(object)
if not object.AuraIndicator then return end
object.FontObjects = object.FontObjects or {}
for index,tags in pairs(oUF.indicators.class[playerClass])do
local auraGroup = createIndicatorGroup(object, index, object.Health, oUF.indicators.fonts[index], tags)
object.FontObjects[index] = {
name = "Aura Indicator Group : ".. index,
object = auraGroup
}
end
end
for index, object in ipairs(oUF.objects) do generateAuraGroups(object) end
it tells the ouf core to run this function when the 'UNIT_AURA' event occurs on the unitframe.
Code:
oUF.Tags["[painsupress]"] = function(u) if not NeedsIndicators(u)then return end; return UnitAura(u, "Pain Suppression") and "|cff33FF33+|r" or "" end
oUF.TagEvents["[painsupress]"] = "UNIT_AURA"
Im working on ace3ConfigGui support for my singleton layout, next i do the same for my raid layout.
|