All pastes #66658 Raw Edit

Anonymous

public lua v1 · immutable
#66658 ·published 2006-06-17 21:40 UTC
rendered paste body
idUnitframes = {}idUnitframes.f = {}idUnitframes.Debug = truefunction idUnitframes:debug(str)    if self.Debug then        DEFAULT_CHAT_FRAME:AddMessage('idUnitframes: Debug: '..str)    endendfunction idUnitframes:Enable() endfunction idUnitframes:Disable() endfunction idUnitframes:newUnitframe(name)    -- I want each unitframe to be 245 pixels wide and 21 pixels high including    -- the border    local Wrap    local Background    local Border    local Icon    local TextBinding    local TextSpellsleft    local TextMacroname    Wrap = CreateFrame('frame', name, UIParent)    Wrap:SetWidth(245)    Wrap:SetHeight(21)    Wrap:SetBackdrop({        bgFile   ='Default',        edgeFile ='Default',        tile = 0,        tilesize = 0,        edgesize = 1,        insets = {top = 0, left = 0, right = 0, bottom = 0}    })    Wrap:SetBackdropColor(0,0,0,0.4)    Wrap:SetBackdropBorderColor(0,0,0,1)    Wrap:ClearAllPoints()    Wrap:SetPoint('CENTER', UIParent, 'CENTER')    Wrap:Show()endidUnitframes.f.Player = idUnitframes:newUnitframe('idufPlayer')