Skip to content

Commit

Permalink
[retail] Fix achievement search preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Gethe committed Dec 20, 2022
1 parent 9ec21ff commit 97762e6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Skin/Retail/Interface/AddOns/Blizzard_AchievementUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ do --[[ AddOns\Blizzard_AchievementUI.lua ]]
end
end
end

local SearchPreviewButtonHieght = 27
function Hook.AchievementFrame_ShowSearchPreviewResults()
local numResults = _G.GetNumFilteredAchievements()
if numResults > 5 then
numResults = 6
end

_G.AchievementFrame.SearchPreviewContainer:SetPoint("BOTTOM", _G.AchievementFrame.SearchBox, 0, -(numResults * SearchPreviewButtonHieght))
end
end

do --[[ AddOns\Blizzard_AchievementUI.xml ]]
Expand Down Expand Up @@ -315,6 +325,7 @@ end

function private.AddOns.Blizzard_AchievementUI()
_G.hooksecurefunc("AchievementFrame_RefreshView", Hook.AchievementFrame_RefreshView)
_G.hooksecurefunc("AchievementFrame_ShowSearchPreviewResults", Hook.AchievementFrame_ShowSearchPreviewResults)

----------------------
-- AchievementFrame --
Expand Down

0 comments on commit 97762e6

Please sign in to comment.