Originally Posted by Fizzlemizz
|
Cool! This thing blocked my keyboard. But the next question is how to close MainFrame when escape is pressed? I tried to disable keyboard when key up or key down but this wont work.
Maybe I need to create event OnKeyDown on my button rather than on MainFrame?
Code:
function MainFrame_OnKeyDown()
if arg1 == "ESCAPE" then MainFrame:Hide() end
end
function MainFrame_OnKeyUp()
MainFrame:EnableKeyboard(false)
end