Page 1 of 1
[0.6.1]create 2 messegadialogs freezes game
Posted: Thu Aug 08, 2013 3:35 pm
by drs9999
if you create 2 messegedialogs (in the same tick?!) you can only close the second one, so you can not return to game.
Step to reproduce:
- copy this into the command line:
Code: Select all
game.showmessagedialog("test") game.showmessagedialog("test2")
Re: [0.6.1]create 2 messegadialogs freezes game
Posted: Sat Aug 10, 2013 4:30 pm
by kovarex
Ok, so I'm not only going to fix that bug, but I will extend the game, so in this case, instead of showing the last one, it will show all of the message dialogs.
In other words, new added dialogs will be added to the queue, this might simplify some scripting.
Re: [0.6.1]create 2 messegadialogs freezes game
Posted: Sat Aug 10, 2013 8:58 pm
by SilverWarior
kovarex wrote:In other words, new added dialogs will be added to the queue, this might simplify some scripting.
If you are goind to use this approach make sure that last added dialog is always shown.
Why? This is why Modal dialogs work in windows. The last one shown is always topmost. So modders would be acoustomed with the way how dialogs works.
Another aproach would be so that each dialog maintains its own code for closing. This will alow you to have as many dialogs as wanted, and you could close them in any oder you would want. Coulkd come quite hand for making modul based UI where you can be opening/closing seperate windows so you get customizable UI.
Re: [0.6.1]create 2 messegadialogs freezes game
Posted: Sat Aug 10, 2013 9:48 pm
by kovarex
The last is always shown, because every dialog is always shown.
Code: Select all
game.showmessagedialog("test") game.showmessagedialog("test2")
This code will result in message dialog with "test", and when you press tab to continue, you will get another message dialog with "test2"
Re: [0.6.1]create 2 messegadialogs freezes game
Posted: Sun Aug 11, 2013 7:11 am
by drs9999
Thats sounds great, thanks for that.