WoWInterface SVN CompactBars

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 23 to Rev 24
    Reverse comparison

Rev 23 → Rev 24

CompactBars/libs/sbar.lua
93,7 → 93,7
local caller = string.match(debugstack(2,2,0), ": in function [`<](.-)['>]")
error(tostring("Bad argument %d in function %s. (%s instead of %s)"):format(num, caller, type(param), types))
end
 
local markers = newList()
--*-------------------------------------------
-- private methods
--*-------------------------------------------
181,6 → 181,8
if not _bar then return nil end
if not _bar.dur then return nil end
return _bar[k]
 
 
end
barmt.__newindex=function(t,k,v)
local tmp
620,6 → 622,7
overlapRotate()
overlap = 0
sbar:UpdateFrameLevel()
sbar:UpdateMarkers()
end
 
el = 0
1095,6 → 1098,63
--*-------------------------------------------
-- public methods
--*-------------------------------------------
function sbar:RemoveMarkers()
for _, marker in pairs(markers) do
marker:Hide()
marker = nil
end
deepDel(markers)
markers = newList()
end
function sbar:CreateMarker(point)
argcheck(point, 1, "number")
if not scaleinfo.frame then return end
local maxpos = (getMaxPos() or -1) + 1
local f = CreateFrame("Frame", nil, scaleinfo.frame)
if scaleinfo.horizontal then
f:SetHeight(scaleinfo.height * maxpos)
f:SetWidth(1)
local sekinp = scaleinfo.frame:GetWidth() / scaleinfo.maxtime
if not scaleinfo.loflag then
f:SetPoint("BOTTOMLEFT", scaleinfo.frame, "TOPLEFT", sekinp*point, -8)
else
f:SetPoint("TOPLEFT", scaleinfo.frame, "BOTTOMLEFT", sekinp*point, 8)
end
 
else
local sekinp = scaleinfo.frame:GetHeight() / scaleinfo.maxtime
if not loflag then
barf:SetPoint("BOTTOMRIGHT", scaleinfo.frame, "BOTTOMLEFT", 8, sekinp*point)
else
barf:SetPoint("BOTTOMLEFT", scaleinfo.frame, "BOTTOMRIGHT", -8, sekinp*point)
end
f:SetWidth(maxpos * scaleinfo.height)
f:SetHeight(1)
end
local tex = f:CreateTexture(nil, "BACKGROUND")
 
 
tex:SetTexture(scaleinfo.texture or default.texture)
tex:SetVertexColor(1, 1, 1, 1)
tex:SetWidth(f:GetWidth())
tex:SetHeight(f:GetHeight())
tex:SetAllPoints(f)
f:SetFrameLevel(100)
 
tinsert(markers, f)
end
function sbar:UpdateMarkers()
if not getMaxPos() then return end
local maxpos = getMaxPos() + 1
 
for _, marker in pairs(markers) do
if scaleinfo.horizontal then
marker:SetHeight(scaleinfo.height * maxpos)
else
marker:SetWidth(maxpos * scaleinfo.height)
end
end
end
function sbar:createTicker(bar, dur)
if not bar then return end
if not bar.icon then return end
1274,6 → 1334,7
scaleinfo.amaxtimes = deepCopy(amaxtimes)
scaleinfo.iconpos = iconpos
scaleinfo.hide = hide
scaleinfo.texture = texture
if horizontal then
scaleinfo.frame = createHorizontalScale(size, maxtime, steps, savepos, loflag, texture)
else
CompactBars/core.lua
396,6 → 396,9
CompactBars.db.profile.scale, CompactBars.db.profile.height, CompactBars.db.profile.fonts,
CompactBars.db.profile.scaletext, CompactBars.db.profile.amaxtimes, CompactBars.db.profile.ehidescale,
CompactBars.db.profile.eiconpos, CompactBars.db.profile.nevershowscale)
for k, v in pairs({strsplit(",", CompactBars.db.profile.markers)}) do
CompactBars.sb:CreateMarker(tonumber(strtrim(v)))
end
self:SpellUpdate()
end
function CompactBars:OnInitialize()
CompactBars/localization/deDE.lua
1,5 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("CompactBars", "deDE")
if L then
L["Points of time"] = "Zeitpunkte"
L["Used to create lines at special destinations"] = "Wird benutzt um Linien zu gewissen Zeitpunkten zu erzeugen"
L["Markers"] = "Markierungen"
L["Never show scale"] = "Skala nie anzeigen"
L["Enable Ticks"] = "Ticks aktivieren"
L["Tick time"] = "Dauer zwischen ticks"
CompactBars/localization/enUS.lua
1,5 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("CompactBars", "enUS", true)
if L then
L["Points of time"] = "Points of time"
L["Used to create lines at special destinations"] = "Used to create lines at special destinations"
L["Markers"] = "Markers"
L["Never show scale"] = "Never show scale"
L["Enable Ticks"] = "Enable ticks"
L["Tick time"] = "Tick time"