Re: [AD] native filechooser addon |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Mon, 2009-02-23 at 08:41 +1100, Peter Wang wrote:
>
> You should give them better filenames.
>
True.
> Would it be extended for simple alert boxes and so on?
>
An alert box like allegro_message would be very easy of course.
> There is no way to forcefully cancel a dialog box. If you pop up a file
> dialog, but then the user decides to quit the program without closing
> that dialog the you'll probably have a problem as the event queue might
> be destroyed already.
>
True. Will add a function to cancel the current dialog.
I initially had it so the creation function would return an
ALLEGRO_EVENT_SOURCE, and you would only pass back the event. But it
seemed to go a bit against the idea to make this as simple to use as
possible. Calling the dialog would then look like this:
ALLEGRO_EVENT_SOURCE *filechooser = al_spawn_native_file_dialog(path, patterns, mode)
al_register_event_source(queue, filechooser);
...
if (event.type == ALLEGRO_EVENT_NATIVE_FILE_CHOOSER) {
count = al_finalize_native_file_dialog(&event, result, 1);
}
Guess it's not that much more to type, and the advantage is that there
would be no possibility to access a removed queue.
--
Elias Pschernig <elias@xxxxxxxxxx>