[SDL] SDL interaction with OSX menus

Stephen Anthony sa666666 at gmail.com
Wed Apr 7 07:39:56 PDT 2010


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.




More information about the SDL mailing list