I'm currently creating a GUI in which operations need to be halted until a user clicks a pushbutton which calls uiresume. Uiwait creates a figure window if none exists, however, and if the user closes this, uiresume is called whether or not the user hits the button. Is there a way to prevent this, or is uiwait/uiresume not the best way of going about this?
Note that there also may be other figure windows open (depending on the user's actions) at the time, and if possible I would like to have whether or not the program resumes dependent solely on the pushbutton.
Thanks in advance!