SDL interaction with OSX menus

I have an SDL application here that has an associated NIB file for the
menus. The menu events are tied to functions in the app, and that part
is working fine. However, there’s a problem with clicking on the menu
itself, or with the time between the start click and the menu
disappearing. It seems that if sound is running in the background, it
’sticks’ while the menu event handler is running, and doesn’t return
until the menu is released.

What I’d like is to grab the ‘select menu’ event and pass it to the SDL
app, and have it pause while menu stuff is happening. Then, when the
menu disappears, SDL unpauses and continues normally. Basically, I’m
asking if there’s an OSX event for simply selecting a menu item. Note
that I mean selecting (as in a single-click to show the menu), not
actually selecting a menu subitem and exiting the menu right away.

This is most evident by just clicking anywhere in the menu. I assume
that doing so leaves the SDL event loop and enters the menu event loop.
I’m looking for a way to know when that transition happens.

Thanks in advance for any info,
Steve A.

Very good question. Could you send me your app. I’m really interested
in more Mac OS X integration.
My mail is @Jorge_Vega_Sanchez

Thanks.On 07/04/2010, at 16:39, Stephen Anthony wrote:

I have an SDL application here that has an associated NIB file for
the menus. The menu events are tied to functions in the app, and
that part is working fine. However, there’s a problem with clicking
on the menu itself, or with the time between the start click and the
menu disappearing. It seems that if sound is running in the
background, it ‘sticks’ while the menu event handler is running, and
doesn’t return until the menu is released.

What I’d like is to grab the ‘select menu’ event and pass it to the
SDL app, and have it pause while menu stuff is happening. Then,
when the menu disappears, SDL unpauses and continues normally.
Basically, I’m asking if there’s an OSX event for simply selecting a
menu item. Note that I mean selecting (as in a single-click to show
the menu), not actually selecting a menu subitem and exiting the
menu right away.

This is most evident by just clicking anywhere in the menu. I
assume that doing so leaves the SDL event loop and enters the menu
event loop. I’m looking for a way to know when that transition
happens.

Thanks in advance for any info,
Steve A.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

The application is Stella, which can be downloaded from
http://stella.sf.net.

Thanks,
SAOn April 7, 2010 01:31:01 pm Jorge Vega Sanchez wrote:

Very good question. Could you send me your app. I’m really interested
in more Mac OS X integration.
My mail is memmaker650 at gmail.com