mirror of
https://codeberg.org/Duvelcorp/MetaHunt.git
synced 2026-10-11 11:00:00 +00:00
Fix Beast Lore ability coloring (color chips) and filter-row layout
This commit is contained in:
+11
-1
@@ -4292,7 +4292,7 @@ local function MTH_BOOK_GetRowValues(entry)
|
||||
if not beast then return { "", "", "", "", "", "", "", "", "", "" } end
|
||||
local beastDisplayName = (MTH and MTH.GetLocalizedBeastName and MTH:GetLocalizedBeastName(entry, beast.name)) or beast.name
|
||||
local traits = MTH_BOOK_ParseBeastTraits(beast)
|
||||
local abilities = MTH_BOOK_GetBeastAbilitiesColored(beast)
|
||||
local abilities = MTH_BOOK_GetBeastAbilitiesSummary(beast)
|
||||
local zone = MTH_BOOK_GetBeastZoneSummary(beast)
|
||||
return {
|
||||
"|cFF33CCFF" .. tostring(entry) .. "|r",
|
||||
@@ -4786,6 +4786,16 @@ MTH_BOOK_UpdateResults = function()
|
||||
label = label .. ","
|
||||
end
|
||||
chip.text:SetText(label)
|
||||
-- Colour by whether the hunter already knows this exact ability rank.
|
||||
if MTH_BOOK_STATE.mode == "pets" and type(MTH_IsPetAbilityKnownByHunter) == "function" then
|
||||
if MTH_IsPetAbilityKnownByHunter(ability.tooltipName or ability.name, ability.requestedRank) then
|
||||
chip.text:SetTextColor(0.30, 1.00, 0.30)
|
||||
else
|
||||
chip.text:SetTextColor(1.00, 0.35, 0.35)
|
||||
end
|
||||
else
|
||||
chip.text:SetTextColor(1, 1, 1)
|
||||
end
|
||||
local textWidth = chip.text:GetStringWidth() or 24
|
||||
if textWidth < 16 then textWidth = 16 end
|
||||
local chipWidth = ((MTH_BOOK_STATE.mode == "families") and 15 or 14) + textWidth
|
||||
|
||||
Reference in New Issue
Block a user