Re: Re: [AD] OSX - About dialog |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
My first message was a bit unclear perhaps.
To make a normal app, i.e. one that looks like any other OSX app, you _need_ to bind it into a bundle together with its resources and some metadata. Allegro's fixbundle tool does this.
For the programmer, no extra _code_ would be required to make this appear as an About box, the system does it all. Nothing would break cross-platform. It's just a nice-to-have, as adding an application icon is nice on the Windows platform.
Pete
>
> From: Chris <chris.kcat@xxxxxxxxxx>
> Date: 2005/10/13 Thu PM 11:11:12 GMT
> To: alleg-developers@xxxxxxxxxx
> Subject: Re: [AD] OSX - About dialog
>
> On Thursday 13 October 2005 03:43 pm, Evert Glebbeek wrote:
> > There is a difference though: there's no standard way for an Allegro
> > application to have an `about' dialog in Windows (since it has no menu
> > bar) or X11 (same).
>
> You could have a system/graphics driver vtable entry, and just hook OSX's
> 'About...' menu function with it. Given that to have a menu bar, it needs to
> have a window/graphics mode set, you could do it by using a custom Allegro
> DIALOG. Something like:
>
> int display_about_dialog(const char *img_file, const char *text_file)
> {
> if(!gfx_driver)
> return FALSE;
> if(gfx_driver->show_about)
> return gfx_driver->show_about(img_file, text_file);
>
> about_dialog[f].dp = load_bitmap(img_file, pal);
> about_dialog[b].dp = load_text(text_file);
>
> do_dialog(about_dialog, -1);
>
> destroy_bitmap(about_dialog[f].dp);
> about_dialog[f].dp = NULL;
> free(about_dialog[b].dp);
> about_dialog[b].dp = NULL;
>
> return TRUE;
> }
>
> then:
> set_osx_about_hook(display_about_dialog);
>
> Of course it'd be a bit more complex than that, but I could probably throw a
> simple one together easilly enough. The main problem would be that there'd be
> no way to easilly parse HTML.. which is why it'd probably be better to not
> make it an OSX specific thing.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers
>
-----------------------------------------
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software
Visit www.ntlworld.com/security for more information