WoW:Make Frames Closable With the "Esc" Key: Difference between revisions

no edit summary
(example + some fancy work)
No edit summary
Line 31: Line 31:


the OnShow and OnHide parts will play the usual sound that's played when you open/close blizzards frames - e.g. your character frame
the OnShow and OnHide parts will play the usual sound that's played when you open/close blizzards frames - e.g. your character frame
==note==
This does not work for me.  Not even a little bit.  What I found *does* work is this simple bit of code added to any frame (in this example, 'testframe')
  testeditbox = CreateFrame("EditBox",nil,testframe,"InputBoxTemplate")
  testeditbox:SetScript("OnEscapePressed",function()
    testframe:Hide()
  end)


[[Category: HOWTOs|Make frames closable with the ESCape key]]
[[Category: HOWTOs|Make frames closable with the ESCape key]]
Anonymous user