Detecting when the dialog options gui is visible...

Started by markbilly, Wed 25/08/2010 16:56:08

Previous topic - Next topic

markbilly

For some reason, the dialog option GUI (I'm using my own) is the only GUI with which you can't use the "gui.Visible = true/false" feature... It just doesn't work.

Is there a way of detecting when it's visible?

This also came up as part of this issue for which we found no solution.
 

monkey0506

If you're using the built-in dialog options rendering with a text window GUI, then as I said in the other thread, you'll need to make sure that "Run game loops while dialog options are displayed" is set to True, and then you can only check whether the GUI is shown from within repeatedly_execute_always:

Code: ags
// rep_ex_always
if (gDialog.Visible) { // dialog options are shown
}
else { // dialog options are not shown
}


Keep in mind this would only tell you whether options were actively being displayed, not whether a dialog script was running.

If you're using custom dialog options rendering then you could check if options were currently displayed using the available functions. dialog_options_render would indicate the options were being shown. dialog_options_mouse_click would indicate the player had clicked on the options and so they were no longer being shown.

markbilly

I have the option set to true. There must be something funky about how AGS works, which means you can't do the whole visible thing with dialog option guis...

This thread can be locked/deleted as this problem is also being covered in the other thread.
 

SMF spam blocked by CleanTalk