Re: [AD] non blocking menu bug

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Eric Botcazou wrote:

> I don't think we support this construct:
>
> 	p = init_dialog(dlg, -1);
> 	while (!keypressed())
> 		update_dialog(p);
> 	shutdown_dialog(p);
>
> The return value of update_dialog() must be checked to ensure that we can
> safely call shutdown_dialog().

Does this mean that if I want to close a dialog from the code, I have to wait 
for the user to close the menu? This would be very awkward, because say the 
user opens a menu, then decides to close the (windowed) application with the 
close button. The user would expect the application to close, but it will 
have to remain open until the menu gets discarded by the user...

I could always try to simulate a keypress to the ESC key, hoping it will 
discard the menu, but this feels rather ugly, no ?

-- 
Julien Cugnière




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/