WoWInterface SVN CompactBars

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 19 to Rev 20
    Reverse comparison

Rev 19 → Rev 20

CompactBars/libs/sbar.lua
645,7 → 645,13
 
f:SetScript("OnMouseDown", OnDragStart)
f:SetScript("OnMouseUp", OnDragStop)
 
if CompactBars.db.profile.nevershowscale then
if checkLog() then
scaleinfo.part = f:GetHeight() / steps
f:SetHeight(f:GetHeight() + scaleinfo.part * #scaleinfo.amaxtimes)
end
return f
end
local maintexture = f:CreateTexture(nil, "BACKGROUND")
maintexture:SetTexture(texture or default.texture)
maintexture:SetPoint("CENTER", 0, -1)
753,8 → 759,15
 
f:SetScript("OnMouseDown", OnDragStart)
f:SetScript("OnMouseUp", OnDragStop)
if CompactBars.db.profile.nevershowscale then
if checkLog() then
scaleinfo.part = f:GetWidth() / steps
f:SetWidth(f:GetWidth() + scaleinfo.part * #scaleinfo.amaxtimes)
end
return f
end
local maintexture = f:CreateTexture(nil, "BACKGROUND")
--maintexture:SetTexture(texture or default.texture)
maintexture:SetTexture(texture or default.texture)
maintexture:SetPoint("CENTER", 0, -1)
maintexture:SetHeight(2)
maintexture:SetVertexColor(1, 1, 1, 1)
767,10 → 780,10
font:SetText(string.sub(tostring(secforstep * i), 1, 3))
end
local tex = f:CreateTexture(nil, "BACKGROUND")
--tex:SetTexture(texture or default.texture)
tex:SetTexture(texture or default.texture)
tex:SetHeight(6)
tex:SetWidth(2)
--tex:SetVertexColor(1, 1, 1, 1)
tex:SetVertexColor(1, 1, 1, 1)
if not loflag then
if i == steps then
tex:SetPoint("BOTTOMLEFT", width -2, 16)
806,7 → 819,7
font:SetText(tex)
end
local tex = f:CreateTexture(nil, "BACKGROUND")
--tex:SetTexture(texture or default.texture)
tex:SetTexture(texture or default.texture)
tex:SetHeight(6)
tex:SetWidth(2)
tex:SetVertexColor(1, 1, 1, 1)
1222,7 → 1235,7
-- @param loflag Indicates if the scale is on the left or above the bars (default is right or beneath)
-- @param texture The texture of the scale
-- @param locked The lock status of the bar
function sbar:CreateScale(size, maxtime, steps, maxneg, savepos, horizontal, loflag, texture, locked, scale, height, fonts, scaletext, amaxtimes, hide, iconpos)
function sbar:CreateScale(size, maxtime, steps, maxneg, savepos, horizontal, loflag, texture, locked, scale, height, fonts, scaletext, amaxtimes, hide, iconpos, noscale)
argcheck(size, 1, "number")
argcheck(maxtime, 2, "number")
argcheck(steps, 3, "number")
1239,17 → 1252,24
argcheck(amaxtimes, 14, "table")
argcheck(hide, 15, "boolean", "nil")
argcheck(iconpos, 16, "boolean", "nil")
argcheck(noscale, 17, "boolean", "nil")
scaleinfo = newList()
scaleinfo.fonts = deepCopy(fonts)
scaleinfo.scaletext = scaletext
scaleinfo.amaxtimes = deepCopy(amaxtimes)
scaleinfo.iconpos = iconpos
scaleinfo.hide = hide
DEFAULT_CHAT_FRAME:AddMessage("WHAT THE FUCK")
if horizontal then
scaleinfo.frame = createHorizontalScale(size, maxtime, steps, savepos, loflag, texture)
else
scaleinfo.frame = createVericalScale(size, maxtime, steps, savepos, loflag, texture)
end
DEFAULT_CHAT_FRAME:AddMessage("WHAT THE FUCK TEST")
if not scaleinfo.frame then DEFAULT_CHAT_FRAME:AddMessage("suck it")
else
DEFAULT_CHAT_FRAME:AddMessage("suck i123123t")
end
scaleinfo.frame:SetScale(scale)
scaleinfo.horizontal = horizontal
scaleinfo.size = size
1418,7 → 1438,7
end
--- Redraws the Scale
-- @see CreateScale
function sbar:RedrawScale(size, maxtime, steps, maxneg, savepos, horizontal, loflag, texture, locked, scale, height, fonts, scaletext, amaxtimes, hide, iconpos)
function sbar:RedrawScale(size, maxtime, steps, maxneg, savepos, horizontal, loflag, texture, locked, scale, height, fonts, scaletext, amaxtimes, hide, iconpos, noscale)
if bars then
for _, bar in pairs(bars) do
if bar.frame then
1443,7 → 1463,7
deepDel(fixedText)
fixedText = nil
fixedText = newList()
sbar:CreateScale(size, maxtime, steps, maxneg, savepos, horizontal, loflag, texture, locked, scale, height, fonts, scaletext, amaxtimes, hide, iconpos)
sbar:CreateScale(size, maxtime, steps, maxneg, savepos, horizontal, loflag, texture, locked, scale, height, fonts, scaletext, amaxtimes, hide, iconpos, noscale)
end
--*--------------------------------
-- only for documentation purpose