All pastes #70156 Raw Edit

hyperactiveChipmunk

public lua v1 · immutable
#70156 ·published 2006-06-23 20:50 UTC
rendered paste body
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,