Skip to content

Commit

Permalink
camelcase
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Jun 16, 2024
1 parent b4de855 commit 31acba7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions idTip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,13 @@ f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(_, _, what)
if what == "Blizzard_AchievementUI" then
-- common functions between branches
local achievement_enter = function(button)
local achievementEnter = function(button)
GameTooltip:SetOwner(button, "ANCHOR_NONE")
GameTooltip:SetPoint("TOPLEFT", button, "TOPRIGHT", 0, 0)
addLine(GameTooltip, button.id, kinds.achievement)
GameTooltip:Show()
end
local criteria_enter = function(index)
local criteriaEnter = function(index)
return function(self)
local button = self:GetParent() and self:GetParent():GetParent()
if not button or not button.id then return end
Expand All @@ -371,7 +371,7 @@ f:SetScript("OnEvent", function(_, _, what)
end
if AchievementTemplateMixin then
-- dragonflight
hook(AchievementTemplateMixin, "OnEnter", achievement_enter)
hook(AchievementTemplateMixin, "OnEnter", achievementEnter)
hook(AchievementTemplateMixin, "OnLeave", GameTooltip_Hide)

local hooked = {}
Expand All @@ -380,7 +380,7 @@ f:SetScript("OnEvent", function(_, _, what)
local frame = self[pool][index]
frame.___index = index
if frame and not hooked[frame] then
hookScript(frame, "OnEnter", criteria_enter(index))
hookScript(frame, "OnEnter", criteriaEnter(index))
hookScript(frame, "OnLeave", GameTooltip_Hide)
hooked[frame] = true
end
Expand All @@ -393,14 +393,14 @@ f:SetScript("OnEvent", function(_, _, what)
elseif AchievementFrameAchievementsContainer then
-- pre-dragonflight
for i,button in ipairs(AchievementFrameAchievementsContainer.buttons) do
hookScript(button, "OnEnter", achievement_enter)
hookScript(button, "OnEnter", achievementEnter)
hookScript(button, "OnLeave", GameTooltip_Hide)

local hooked = {}
hook(_G, "AchievementButton_GetCriteria", function(index, renderOffScreen)
local frame = _G["AchievementFrameCriteria" .. (renderOffScreen and "OffScreen" or "") .. index]
if frame and not hooked[frame] then
hookScript(frame, "OnEnter", criteria_enter(index))
hookScript(frame, "OnEnter", criteriaEnter(index))
hookScript(frame, "OnLeave", GameTooltip_Hide)
hooked[frame] = true
end
Expand Down

0 comments on commit 31acba7

Please sign in to comment.