Skip to content

Commit

Permalink
Add ESCAPE key functionality to hide the GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
tg123 committed Mar 3, 2024
1 parent 9838465 commit 2062d57
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ f:SetMovable(true)
f:RegisterForDrag("LeftButton")
f:SetScript("OnDragStart", f.StartMoving)
f:SetScript("OnDragStop", f.StopMovingOrSizing)
f:SetScript("OnKeyDown", function (_, key)
if key == "ESCAPE" then
f:Hide()
end
end)
f:Hide()

MySlot.MainFrame = f
Expand Down

0 comments on commit 2062d57

Please sign in to comment.