header
DirectGameMenu avatar

DirectGameMenu

Install

This tiny addon opens the game menu (bound to the "Escape" key by default) in one press. With this, you will only have to press "Escape" once to open the game menu even if you have a target or are casting a spell. It does this by overriding Blizzard's ToggleGameMenu function with its own, much smaller function. Here's the code:

ToggleGameMenu = function()
    if not UIParent:IsShown() then
        SetUIVisibility(true)
    end
    if GameMenuFrame:IsShown() then
        PlaySound(SOUNDKIT.IG_MAINMENU_QUIT)
        HideUIPanel(GameMenuFrame)
    else
        PlaySound(SOUNDKIT.IG_MAINMENU_OPEN)
        ShowUIPanel(GameMenuFrame)
    end
end