Home   Help Search Login Register  

Author Topic: Close all active dialogs?  (Read 1726 times)

0 Members and 1 Guest are viewing this topic.

Offline ModestNovice

  • Members
  • *
Close all active dialogs?
« on: 26 Jun 2009, 08:46:50 »
Hello everyone, I was wondering if there is a way to close any open dialogs?

As I have this scenario in a menu with 2 Buttons:
< = Goes back to last dialog
X = exit current and any other dialogs

Thanks,
DaChevs
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Close all active dialogs?
« Reply #1 on: 26 Jun 2009, 11:36:46 »
I believe the topmost dialogue is always closed when you use closeDialog 0. As to closing -all- open dialogs, well...um. I'm sure there's some smarter way as well, but:

Code: [Select]
for "_i" from 0 to 100 do {closeDialog 0; sleep 0.02};
Which simply runs 100 closedialogs consecutively, which should get rid of most open dialogs I'd say ;) (change to 10 or 2 or whatever if you want)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline i0n0s

  • Former Staff
  • ****
Re: Close all active dialogs?
« Reply #2 on: 26 Jun 2009, 16:19:45 »
Code: [Select]
while {dialog} do {closeDialog 0};;)

Offline ModestNovice

  • Members
  • *
Re: Close all active dialogs?
« Reply #3 on: 26 Jun 2009, 22:44:30 »
thanks guys :)
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley