Skip to content

Commit

Permalink
Handle ESC keypress
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoRogai committed Nov 25, 2024
1 parent cd4e4e7 commit 6ed776b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions RepHub.lua
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,11 @@ function RepHub:CreateRepHubFrame()
RepHubFrame:AddChild(RepHubTableGroup)

RepHubFrame.frame:Hide()

_G["RepHubFrame"] = RepHubFrame.frame
if not tContains(UISpecialFrames, "RepHubFrame") then
table.insert(UISpecialFrames, "RepHubFrame")
end
end

function RepHub:ShowFactionDetailFrame(factionName)
Expand All @@ -465,6 +470,7 @@ function RepHub:ShowFactionDetailFrame(factionName)
local factionData = RepHub:GetFactionDataByName(factionName)

if factionData.isAccountWide then
print("RepHub: No details available for account-wide reputations")
return
end

Expand All @@ -474,6 +480,7 @@ function RepHub:ShowFactionDetailFrame(factionName)
RepHubFactionDetailFrame:SetCallback(
"OnClose",
function(widget)
RepHubFactionDetailFrame = nil
AceGUI:Release(widget)
end
)
Expand Down Expand Up @@ -515,6 +522,11 @@ function RepHub:ShowFactionDetailFrame(factionName)
RepHubFactionDetailFrame:AddChild(factionDetailScrollFrame)

RepHubFactionDetailFrame:Show()

_G["RepHubFactionDetailFrame"] = RepHubFactionDetailFrame.frame
if not tContains(UISpecialFrames, "RepHubFactionDetailFrame") then
table.insert(UISpecialFrames, "RepHubFactionDetailFrame")
end
end

function RepHub:ShowRepHubFrame()
Expand Down

0 comments on commit 6ed776b

Please sign in to comment.