Re: [AD] native menus

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


On Mon, Jun 20, 2011 at 2:56 PM, Elias Pschernig
<elias.pschernig@xxxxxxxxxx> wrote:
> On Sun, 2011-06-19 at 15:42 -0500, Matthew Leverton wrote:
>> Events are sent via the display's event source:
>>
>> if (event.type == ALLEGRO_EVENT_MENU_CLICK && event.menu.id == EXIT_ID)
>>
>
> I wonder if that can work under OSX - the menu seems to be per-process
> and not per-window there.
>
If so, the menu event would go to whatever the active window is. The
bigger problem would be switching the menu whenever a new display is
activated.

I'll have to give the API a bit more thought though with regard to
single menu systems.


On Mon, Jun 20, 2011 at 3:12 PM, Jon Rafkind <workmin@xxxxxxxxxx> wrote:
> Can you make it so the menu can be hidden/shown programmatically? Maybe it
> would only appear if the mouse was near it or something (just as an option).
>
The API is only minimal right now, but something like
al_show/hide_menu(display) would work.

However, under OS X (and perhaps some Linux setups) the menu would not
be attached to the window, so that particular use case wouldn't be
cross platform.

--
Matthew Leverton




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