All pastes #104091 Raw Edit

Unnamed

public lua v1 · immutable
#104091 ·published 2006-07-28 17:14 UTC
rendered paste body
-- Create another StatusBar to be the border.do    local border = CreateFrame("StatusBar",nil,frame)    border:SetMinMaxValues(0,100)    border:SetStatusBarTexture("Interface/Tooltips/UI-Tooltip-Background")    border:SetStatusBarColor(0,0,0,1)    border:ClearAllPoints()        --[[ Paranoid Version:]]    local distance = self.opt.Borders/self.opt.Scale    border:SetPoint("LEFT", frame.Bar, "LEFT", -distance, 0)    border:SetPoint("RIGHT", frame.Bar, "RIGHT", distance, 0)    border:SetPoint("TOP", frame.Bar, "TOP", 0, distance)    border:SetPoint("BOTTOM", frame.Bar, "BOTTOM", 0, -distance)        --[[    bar:SetWidth(62)    bar:SetHeight(9)    bar:SetPoint("TOPLEFT",frame.Bar,"TOPLEFT",-1,1)    ]]    border:SetFrameLevel(frame.Bar:GetFrameLevel()-1)    border:Show()    frame.Bar.border = border    local setvalue = frame.Bar.SetValue    frame.Bar.SetValue = function(this,val)        setvalue(this,val)        --if(self.opt.BarBorders) then            --[[ Paranoid Version:            local w = this:GetWidth()*(val/100)             this.border:SetValue((w+2)/this.border:GetWidth()*100)            ]]            local w = 60*(val/100)            if(w == 0) then                setvalue(this.border,0)            else                setvalue(this.border,(w+2)/0.62)            end        --end    endend