Custom Dialogs - a way to check if dialog options are shown?

Started by abstauber, Mon 31/03/2014 17:17:57

Previous topic - Next topic

abstauber

Is there a way to determine, whether dialogs options are currently displayed?
I have a custom dialog GUI and few function in rep_exec_always which I only want to check while the GUI is shown.

Thanks for any help :)

monkey0506

You can basically just do:

Code: ags
Dialog *runningDialog = null;

function dialog_options_get_dimensions(DialogOptionsRenderingInfo *info)
{
  runningDialog = info.Dialog;
  // etc.
}

function repeatedly_execute_always()
{
  if (runningDialog != null)
  {
    // blah
  }
}

function repeatedly_execute()
{
  runningDialog = null; // the dialog has ended at this point
}

abstauber


SMF spam blocked by CleanTalk