/trunk
return a:GetID() < b:GetID() |
end |
local function sortAlpha( a, b) |
local function sortNameAsc( a, b) |
if not a then return false end |
if not b then return true end |
if a.buffName and b.buffName then return a.buffName < b.buffName end |
return a:GetID() < b:GetID() |
end |
local function sortRevert( a, b) |
local function sortNameDesc( a, b) |
if not a then return false end |
if not b then return true end |
if a.buffName and b.buffName then return a.buffName > b.buffName end |
return a:GetID() < b:GetID() |
end |
local function sortIncrement( a, b) |
local function sortTimeLeftAsc( a, b) |
if not a then return false end |
if not b then return true end |
if a.buffName and b.buffName then |
return a:GetID() < b:GetID() |
end |
local function sortDecrement( a, b) |
local function sortTimeLeftDesc( a, b) |
if not a then return false end |
if not b then return true end |
if a.buffName and b.buffName then |
return a:GetID() < b:GetID() |
end |
local function sortDurationAsc( a, b) |
if not a then return false end |
if not b then return true end |
if a.buffName and b.buffName then |
if a.duration and b.duration then return a.duration < b.duration end |
if a.duration then return true end |
if b.duration then return false end |
return a.buffName > b.buffName |
end |
if a.buffName then return true end |
if b.buffName then return false end |
return a:GetID() < b:GetID() |
end |
local function sortDurationDesc( a, b) |
if not a then return false end |
if not b then return true end |
if a.buffName and b.buffName then |
if a.duration and b.duration then return a.duration > b.duration end |
if a.duration then return true end |
if b.duration then return false end |
return a.buffName > b.buffName |
end |
if a.buffName then return true end |
if b.buffName then return false end |
return a:GetID() < b:GetID() |
end |
local SORT = { |
['none'] = sortNone, |
['alpha'] = sortAlpha, |
['revert'] = sortRevert, |
['inc'] = sortIncrement, |
['dec'] = sortDecrement, |
['alpha'] = sortNameAsc, |
['revert'] = sortNameDesc, |
['inc'] = sortTimeLeftAsc, |
['dec'] = sortTimeLeftDesc, |
['durationasc'] = sortDurationAsc, |
['durationdesc'] = sortDurationDesc, |
} |
--[[--------------------------------------------------------------------------------- |
L.HorizontalName = 'Horizontal First' |
L.HorizontalDesc = 'First dirction for display buttons.' |
L.RowsName = 'Rows' |
L.RowsDesc = 'Count Rows' |
L.ColsName = 'Cols' |
L.ColsDesc = 'Count Cols' |
L.RowsDesc = 'Number of rows' |
L.ColsName = 'Columns' |
L.ColsDesc = 'Number of columns' |
L.OptionName = 'Common Option' |
L.BarName = 'Button Bar Look' |
L.Profile = 'Profile' |
L.ProfileCopied = 'Copied settings from "%s"' |
L.ProfileReset = 'Reset profile "%s"' |
L.SortName = 'Sort' |
L.SortDesc = 'Set the sorting of the bar.' |
L.SortNone = 'none (Blizzard order)' |
L.SortAlpha = 'alphabetical' |
L.SortRevert = 'alphabetical Downward' |
L.SortInc = 'duration increasing' |
L.SortDec = 'duration decreasing' |
L.SortDesc = 'Set the sorting of the buff icons' |
L.SortNone = 'None (Blizzard order)' |
L.SortAlpha = 'Name' |
L.SortRevert = 'Name, Descending' |
L.SortInc = 'Time left' |
L.SortDec = 'Time left, Descending' |
L.SortDurationAsc = 'Duration' |
L.SortDurationDesc = 'Duration, Descending' |
end |
do |
['revert'] = 3, |
['inc'] = 4, |
['dec'] = 5, |
['durationasc'] = 6, |
['durationdesc'] = 7, |
} |
local SORT_DESC = { |
[1] = L.SortNone, |
[3] = L.SortRevert, |
[4] = L.SortInc, |
[5] = L.SortDec, |
[6] = L.SortDurationAsc, |
[7] = L.SortDurationDesc |
} |
local HIDE_BLIZZ_BARS = true -- for testing |
local SUB_HELP_MSG = ' - |cFF33FF99%s|r: %s' |