Re: [AD] OSX - About dialog |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] OSX - About dialog
- From: Chris <chris.kcat@xxxxxxxxxx>
- Date: Thu, 13 Oct 2005 16:11:12 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=GMqwX52VUdlrBlDAq5WEJvuoPq42Q5Elt9PFEWsOSC+EfOec3mau0MwijNTa9H65r9Yb6oJJmBAVAFYckI2HKZeJDXcY5WQUb4Zzl1Yjie0JXGSG0FQAssdB8QrBZsnV5ZVTB5IxFd01B9ICXufWs4ez68IUsZtigbNzfMoecxQ=
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.