Skip to content

Commit 2062d57

Browse files
committed
Add ESCAPE key functionality to hide the GUI
1 parent 9838465 commit 2062d57

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gui.lua

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ f:SetMovable(true)
2525
f:RegisterForDrag("LeftButton")
2626
f:SetScript("OnDragStart", f.StartMoving)
2727
f:SetScript("OnDragStop", f.StopMovingOrSizing)
28+
f:SetScript("OnKeyDown", function (_, key)
29+
if key == "ESCAPE" then
30+
f:Hide()
31+
end
32+
end)
2833
f:Hide()
2934

3035
MySlot.MainFrame = f

0 commit comments

Comments
 (0)