otravi_UnitFrames.lua --------------------- CreateFramework: self.frames[u].RaidTarget = self.frames[u]:CreateTexture(nil, "OVERLAY") self.frames[u].RaidTarget:Hide() self.frames[u].RaidTarget:SetTexture("Interface\\TargetingFrame\\UI-RaidTargetingIcons") self.frames[u].RaidTarget:SetWidth(26) self.frames[u].RaidTarget:SetHeight(26) self.frames[u].RaidTarget:SetPoint("CENTER", self.frames[u], "TOPLEFT") functions: updateRaidTarget = function(self, u) local index = GetRaidTargetIndex(u) if self.frames[u].RaidTarget and index then self:updateRaidTargetIcon(u, index) self.frames[u].RaidTarget:Show() else self.frames[u].RaidTarget:Hide() end end, updateRaidTargetIcon = function(self, u, index) index = index - 1 local left, right, top, bottom local coordIncrement = RAID_TARGET_ICON_DIMENSION / RAID_TARGET_TEXTURE_DIMENSION left = mod(index , RAID_TARGET_TEXTURE_COLUMNS) * coordIncrement right = left + coordIncrement top = floor(index/ RAID_TARGET_TEXTURE_ROWS) * coordIncrement bottom = top + coordIncrement self.frames[u].RaidTarget:SetTexCoord(left, right, top, bottom) end, individual frame .lua files --------------------------- Initialize: self:RegisterEvent("RAID_TARGET_UPDATE", "updateRaidTarget") Enable: oUF:updateRaidTarget("target") --or "player" or "targettarget", etc. functions: updateRaidTarget = function(self) oUF:updateRaidTarget("target") end,