Skip to content

Commit b43133b

Browse files
committed
Fix GameMenuFrame staying open in Classic when opening the settings UI (fixes #13)
1 parent f2e60c4 commit b43133b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

NoAutoclose.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,9 @@ function ns:ReworkSettingsOpenAndClose()
145145
end
146146
end
147147
-- this closes the game menu when opening the settings ui, which makes it less buggy when pressing escape to close the settings UI
148-
if GameMenuButtonSettings then
149-
GameMenuButtonSettings:HookScript('OnClick', function()
148+
local settingsButton = GameMenuButtonSettings or GameMenuButtonOptions;
149+
if settingsButton then
150+
settingsButton:HookScript('OnClick', function()
150151
if GameMenuFrame and GameMenuFrame:IsShown() then
151152
HideUIPanel(GameMenuFrame);
152153
end

0 commit comments

Comments
 (0)