Run a function when InterfaceOptionsFrame gets closed
View Single Post
01-05-19, 09:40 AM
A Fallenroot Satyr
Join Date: Oct 2010
Originally Posted by
I have an addon that hides a part of UI under certain conditions with an option to simulate those conditions and test how UI changes. Everything can be done inside the InterfaceOptionsFrame. One problem is that it is possible to close the frame when options remain in simulation state and then the UI remains altered. I would like to run a small function whenever interface frame is closed so my addon can restore the default UI state.
The addon is totally based on Ace libraries. As such, I have Ace-Addon, Ace-Event to register and handle all events, and Ace-Config including Ace-ConfigDialog to create InterfaceOptionsFrame. I can't find anything on hooking the Interface Frame when it gets shown or hidden. Is possible?
As an alternative that many addons use that have a "configuration mode", you can create a dialog button on the screen while in configuration mode that cancels the mode.
View Public Profile
Send a private message to jlam
Find More Posts by jlam