rendered paste bodyidUnitframes = {}idUnitframes.f = {}idUnitframes.Debug = truefunction idUnitframes:debug(str) if self.Debug then DEFAULT_CHAT_FRAME:AddMessage('idUnitframes: Debug: '..str) endendfunction idUnitframes:newUnitframe(name) local fWidth = 245 local fHeight = 21 local Wrap Wrap = CreateFrame('Frame', name, UIParent) Wrap:SetWidth(fWidth) Wrap:SetHeight(fHeight) Wrap:ClearAllPoints() Wrap:SetPoint('CENTER', UIParent, 'CENTER') Wrap:SetBackdrop({ bgFile = 'Interface\\Tooltips\\UI-Tooltip-Background', edgeFile = '', tile = true, tileSize = 16, edgeSize = 0, insets = { left = 0, right = 0, top = 0, bottom = 0 } }) Wrap:SetBackdropColor(0,0,0,0.6) Wrap:SetScale(1) Wrap:SetAlpha(1) Wrap:Show() Wrap.hpbar = CreateFrame('StatusBar', nil, Wrap) Wrap.hpbar:SetWidth((fWidth-6)/2-1.5) Wrap.hpbar:SetHeight(15) Wrap.hpbar:SetStatusBarTexture('Interface\\AddOns\\idUnitframes\\textures\\bar') Wrap.hpbar:SetStatusBarColor(49/255, 227/255, 37/255) Wrap.hpbar:ClearAllPoints() Wrap.hpbar:SetPoint('TOPLEFT', Wrap, 'TOPLEFT', 3, -2) Wrap.powerbar = CreateFrame('StatusBar', nil, Wrap) Wrap.powerbar:SetWidth((fWidth-6)/2-1.5) Wrap.powerbar:SetHeight(15) Wrap.powerbar:SetStatusBarTexture('Interface\\AddOns\\idUnitframes\\textures\\bar') Wrap.powerbar:ClearAllPoints() Wrap.powerbar:SetPoint('TOPRIGHT', Wrap, 'TOPRIGHT', -3, -2) return Wrapendfunction idUnitframes:makePlayerframe() self.f.Player = idUnitframes:newUnitframe('idufPlayer') self.f.Player:ClearAllPoints() self.f.Player:SetPoint('CENTER', UIParent, 'CENTER')endfunction idUnitframes:Enable() self:makePlayerframe()endfunction idUnitframes:Disable() endidUnitframes:Enable()