How to check if dialog is running?

Started by Jonon, Sun 26/10/2003 11:09:16

Previous topic - Next topic

Jonon

Is it possible to check wether a dialog is running?
I want to script something like this:
If (the dialog is running and the dialogGUI==off)
        dialogGUI==on


So that when you're in a dialog and click on an option, the dialogGUI doesn't go away, only the options, so you are left with a nice blackness on the bottom of the screen (just like in MI1 & 2  :)).

Pumaman

The easiest way to do this would be to switch the GUI on before you call RunDialog, then switch it off in repeatedly_execute (since repeatedly_execute does not run while a dialog is in progress).

Jonon

But how would I go about switching on the GUI before I call RunDialog? Is there any perticular place in the global script I can place this?

Pumaman

The easiest way is probably to define your own custom function:


function MyRunDialog(int topic) {
 GUIOn(XX);
 RunDialog(topic);
}


and then use it rather than RunDialog in your scripts.

Jonon


SMF spam blocked by CleanTalk