Added option to move buffs/debuffs with no duration to the end (#56)
* Added option to move buffs/debuffs with no duration to the end of the list * Forgot to remove some testing code
This commit is contained in:
@@ -584,6 +584,18 @@ function A:UpdateHeader(header)
|
||||
local sortMethod = (sorters[db.sortMethod] or sorters.INDEX)[db.sortDir == "-"][db.seperateOwn]
|
||||
tsort(sortingTable, sortMethod)
|
||||
|
||||
if db.noDurationLast then
|
||||
local tempAuras = {}
|
||||
for i = 1, #sortingTable do
|
||||
if sortingTable[i].duration == 0 then
|
||||
table.insert(tempAuras, 1, sortingTable[i])
|
||||
else
|
||||
table.insert(tempAuras, sortingTable[i])
|
||||
end
|
||||
end
|
||||
sortingTable = tempAuras
|
||||
end
|
||||
|
||||
self:ConfigureAuras(header, sortingTable, weaponPosition)
|
||||
while sortingTable[1] do
|
||||
releaseTable(tremove(sortingTable))
|
||||
|
||||
@@ -440,6 +440,20 @@ function UF:SortAuras()
|
||||
sort(self, SortAurasByCaster)
|
||||
end
|
||||
|
||||
if self.db.noDurationLast and self[1] then
|
||||
local tempAuras = {}
|
||||
for i = 1, #self do
|
||||
if self[i].duration == 0 then
|
||||
table.insert(tempAuras, self[i])
|
||||
else
|
||||
table.insert(tempAuras, 1, self[i])
|
||||
end
|
||||
end
|
||||
for i = 1, #tempAuras do
|
||||
self[i] = tempAuras[i]
|
||||
end
|
||||
end
|
||||
|
||||
--Look into possibly applying filter priorities for auras here.
|
||||
|
||||
return 1, #self --from/to range needed for the :SetPosition call in oUF aura element. Without this aura icon position gets all whacky when not sorted by index
|
||||
@@ -510,7 +524,7 @@ function UF:AuraFilter(unit, button, name, _, _, _, debuffType, duration, expira
|
||||
else
|
||||
db = parent.db and parent.db[self.type]
|
||||
end
|
||||
|
||||
|
||||
if not db then
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -105,6 +105,12 @@ local function GetAuraOptions(headerName)
|
||||
[0] = L["No Sorting"],
|
||||
[1] = L["Your Auras First"]
|
||||
}
|
||||
},
|
||||
noDurationLast = {
|
||||
order = 13,
|
||||
type = "toggle",
|
||||
name = L["No Duration Last"],
|
||||
desc = L["Show buffs with no duration last."],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -704,6 +704,7 @@ L["Neutral"] = "Neutral"
|
||||
L["Never Hide"] = "Niemals verstecken"
|
||||
L["No Alert In Combat"] = "Kein Alarm im Kampf"
|
||||
L["No Duration"] = true
|
||||
L["No Duration Last"] = true
|
||||
L["No Sorting"] = "Nicht Sortieren"
|
||||
L["Non-Interruptable"] = "Nicht-Unterbrechbar"
|
||||
L["Non-Target Alpha"] = "Nicht-Anvisiert Alpha"
|
||||
@@ -917,6 +918,7 @@ L["Show Aura From Other Players"] = "Zeige Auren von anderen Spielern"
|
||||
L["Show Auras"] = "Zeige Auren"
|
||||
L["Show Bind on Equip/Use Text"] = "Zeigt gebunden beim Aufheben/Anlegen Text"
|
||||
L["Show Both"] = "Zeige Beide"
|
||||
L["Show buffs with no duration last."] = true
|
||||
L["Show Coins"] = "Währungssymbole anzeigen"
|
||||
L["Show Dispellable Debuffs"] = "Zeige stehlbare Schwächungszauber"
|
||||
L["Show Empty Buttons"] = "Zeige leere Tasten"
|
||||
|
||||
@@ -708,6 +708,7 @@ L["Neutral"] = true
|
||||
L["Never Hide"] = true
|
||||
L["No Alert In Combat"] = true
|
||||
L["No Duration"] = true
|
||||
L["No Duration Last"] = true
|
||||
L["No Sorting"] = true
|
||||
L["Non-Interruptable"] = true
|
||||
L["Non-Target Alpha"] = true
|
||||
@@ -923,6 +924,7 @@ L["Show Aura From Other Players"] = true
|
||||
L["Show Auras"] = true
|
||||
L["Show Bind on Equip/Use Text"] = true
|
||||
L["Show Both"] = true
|
||||
L["Show buffs with no duration last."] = true
|
||||
L["Show Coins"] = true
|
||||
L["Show Dispellable Debuffs"] = true
|
||||
L["Show Empty Buttons"] = true
|
||||
|
||||
@@ -707,6 +707,7 @@ L["Neutral"] = "Neutral"
|
||||
L["Never Hide"] = "Nunca Ocultar"
|
||||
L["No Alert In Combat"] = true
|
||||
L["No Duration"] = true
|
||||
L["No Duration Last"] = true
|
||||
L["No Sorting"] = "No Ordenar"
|
||||
L["Non-Interruptable"] = "No-Interrumpible"
|
||||
L["Non-Target Alpha"] = true
|
||||
@@ -920,6 +921,7 @@ L["Show Aura From Other Players"] = "Mostrar Auras de Otros Jugadores"
|
||||
L["Show Auras"] = "Mostrar Auras"
|
||||
L["Show Bind on Equip/Use Text"] = true
|
||||
L["Show Both"] = "Mostrar Ambos"
|
||||
L["Show buffs with no duration last."] = true
|
||||
L["Show Coins"] = true
|
||||
L["Show Dispellable Debuffs"] = true
|
||||
L["Show Empty Buttons"] = true
|
||||
|
||||
@@ -708,6 +708,7 @@ L["Neutral"] = "Neutre"
|
||||
L["Never Hide"] = "Jamais caché"
|
||||
L["No Alert In Combat"] = "Pas d'alerte en combat"
|
||||
L["No Duration"] = true
|
||||
L["No Duration Last"] = true
|
||||
L["No Sorting"] = "Aucun tri"
|
||||
L["Non-Interruptable"] = "Non-interruptible"
|
||||
L["Non-Target Alpha"] = true
|
||||
@@ -921,6 +922,7 @@ L["Show Aura From Other Players"] = "N'importe quelle unité"
|
||||
L["Show Auras"] = "Afficher les auras"
|
||||
L["Show Bind on Equip/Use Text"] = true
|
||||
L["Show Both"] = "Afficher les deux"
|
||||
L["Show buffs with no duration last."] = true
|
||||
L["Show Coins"] = "Afficher les pièces"
|
||||
L["Show Dispellable Debuffs"] = "Voir les affaiblissements dissipables"
|
||||
L["Show Empty Buttons"] = "Voir les emplacements vide"
|
||||
|
||||
@@ -707,6 +707,7 @@ L["Neutral"] = "중립"
|
||||
L["Never Hide"] = "항시 표시"
|
||||
L["No Alert In Combat"] = "전투 중 알리지 않기"
|
||||
L["No Duration"] = true
|
||||
L["No Duration Last"] = true
|
||||
L["No Sorting"] = "구분 없음"
|
||||
L["Non-Interruptable"] = "차단불가능 기술"
|
||||
L["Non-Target Alpha"] = true
|
||||
@@ -920,6 +921,7 @@ L["Show Aura From Other Players"] = "다른 유저가 건 주문효과도 표시
|
||||
L["Show Auras"] = "오라아이콘 표시"
|
||||
L["Show Bind on Equip/Use Text"] = true
|
||||
L["Show Both"] = "둘 다 배경 표시"
|
||||
L["Show buffs with no duration last."] = true
|
||||
L["Show Coins"] = "동전 이미지로 보기"
|
||||
L["Show Dispellable Debuffs"] = "해제가능한 약화효과 표시"
|
||||
L["Show Empty Buttons"] = "빈 칸 표시"
|
||||
|
||||
@@ -707,6 +707,7 @@ L["Neutral"] = "Neutro"
|
||||
L["Never Hide"] = "Nunca Esconder"
|
||||
L["No Alert In Combat"] = true
|
||||
L["No Duration"] = true
|
||||
L["No Duration Last"] = true
|
||||
L["No Sorting"] = "Não organizado"
|
||||
L["Non-Interruptable"] = "Não interrompível"
|
||||
L["Non-Target Alpha"] = true
|
||||
@@ -920,6 +921,7 @@ L["Show Aura From Other Players"] = "Mostrar Auras de outros Jogadores"
|
||||
L["Show Auras"] = "Mostrar Auras"
|
||||
L["Show Bind on Equip/Use Text"] = true
|
||||
L["Show Both"] = "Mostrar Ambos"
|
||||
L["Show buffs with no duration last."] = true
|
||||
L["Show Coins"] = true
|
||||
L["Show Dispellable Debuffs"] = true
|
||||
L["Show Empty Buttons"] = true
|
||||
|
||||
@@ -704,6 +704,7 @@ L["Neutral"] = "Нейтральный"
|
||||
L["Never Hide"] = "Никогда не скрывать"
|
||||
L["No Alert In Combat"] = "Без оповещений в бою"
|
||||
L["No Duration"] = true
|
||||
L["No Duration Last"] = true
|
||||
L["No Sorting"] = "Без сортировки"
|
||||
L["Non-Interruptable"] = "Непрерываемые"
|
||||
L["Non-Target Alpha"] = "Прозрачность не цели"
|
||||
@@ -917,6 +918,7 @@ L["Show Aura From Other Players"] = "Отображать чужие"
|
||||
L["Show Auras"] = "Показать ауры"
|
||||
L["Show Bind on Equip/Use Text"] = "Отображать текст ПпН/ПпИ"
|
||||
L["Show Both"] = "Показать оба"
|
||||
L["Show buffs with no duration last."] = true
|
||||
L["Show Coins"] = "Показывать монеты"
|
||||
L["Show Dispellable Debuffs"] = "Показывать развеиваемые дебаффы"
|
||||
L["Show Empty Buttons"] = "Показывать пустые кнопки"
|
||||
|
||||
@@ -704,6 +704,7 @@ L["Neutral"] = "中立"
|
||||
L["Never Hide"] = "从不隐藏"
|
||||
L["No Alert In Combat"] = "战斗中不警报"
|
||||
L["No Duration"] = true
|
||||
L["No Duration Last"] = true
|
||||
L["No Sorting"] = "不排序"
|
||||
L["Non-Interruptable"] = "不可打断"
|
||||
L["Non-Target Alpha"] = "非目标透明度"
|
||||
@@ -917,6 +918,7 @@ L["Show Aura From Other Players"] = "显示其他玩家的光环"
|
||||
L["Show Auras"] = "显示光环"
|
||||
L["Show Bind on Equip/Use Text"] = "显示绑定状态"
|
||||
L["Show Both"] = "全部显示"
|
||||
L["Show buffs with no duration last."] = true
|
||||
L["Show Coins"] = "显示硬币"
|
||||
L["Show Dispellable Debuffs"] = "显示可驱散的减益光环"
|
||||
L["Show Empty Buttons"] = "显示空白按钮"
|
||||
|
||||
@@ -704,6 +704,7 @@ L["Neutral"] = "中立"
|
||||
L["Never Hide"] = "從不隱藏"
|
||||
L["No Alert In Combat"] = "戰鬥中不警報"
|
||||
L["No Duration"] = true
|
||||
L["No Duration Last"] = true
|
||||
L["No Sorting"] = "不分類"
|
||||
L["Non-Interruptable"] = "不可斷法的施法條色"
|
||||
L["Non-Target Alpha"] = "非目標透明度"
|
||||
@@ -917,6 +918,7 @@ L["Show Aura From Other Players"] = "顯示其他玩家的光環"
|
||||
L["Show Auras"] = "顯示光環"
|
||||
L["Show Bind on Equip/Use Text"] = "顯示裝綁文字"
|
||||
L["Show Both"] = "全部顯示"
|
||||
L["Show buffs with no duration last."] = true
|
||||
L["Show Coins"] = "顯示硬幣"
|
||||
L["Show Dispellable Debuffs"] = "顯示無法驅散的debuff"
|
||||
L["Show Empty Buttons"] = "顯示空白按鈕"
|
||||
|
||||
@@ -498,8 +498,14 @@ local function GetOptionsTable_Auras(auraType, updateFunc, groupName, numUnits)
|
||||
["DESCENDING"] = L["Descending"]
|
||||
}
|
||||
},
|
||||
stacks = {
|
||||
noDurationLast = {
|
||||
order = 12,
|
||||
type = "toggle",
|
||||
name = L["No Duration Last"],
|
||||
desc = L["Show buffs with no duration last."],
|
||||
},
|
||||
stacks = {
|
||||
order = 13,
|
||||
type = "group",
|
||||
name = L["Stack Counter"],
|
||||
guiInline = true,
|
||||
@@ -528,7 +534,7 @@ local function GetOptionsTable_Auras(auraType, updateFunc, groupName, numUnits)
|
||||
}
|
||||
},
|
||||
duration = {
|
||||
order = 13,
|
||||
order = 14,
|
||||
type = "group",
|
||||
name = L["Duration"],
|
||||
guiInline = true,
|
||||
|
||||
Reference in New Issue
Block a user