| SDL 1.3 menu bars and OS X? |
| SDL 1.3 menu bars and OS X? |
|
Ryan C. Gordon
Guest
|
On 06/07/2011 11:42 AM, VernJensen wrote:
You have two options: 1) Use the built-in menu from SDL, and use Cocoa calls (NSMenu) to add menus to the menu bar that SDL created. 2) Before calling SDL_Init(), call [NSApplication sharedApplication] and create your main menu (either programmatically or with a .nib file). SDL won't set up a menu for you if it sees one already exists. --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
|
||||||||||||||
| Re: SDL 1.3 menu bars and OS X? |
|
VernJensen
|
Thanks Ryan. I tried calling [NSApplication sharedApplication] (have no idea what this does), and indeed, now SDL does not create a menu for me. But neither does it use the menu in my .nib file. Is there code I must specifically call to tell Cocoa to use the .nib file? Sorry, I'm so new to all of this! If you have a webpage that'd point me in the right direction, I'd be happy to read that too. Thanks again. |
|||||||||||||
|
|
||||||||||||||
| SDL 1.3 menu bars and OS X? |
|
Ryan C. Gordon
Guest
|
http://cocoadev.com/ is a good start if you want to really get into Objective-C and Cocoa. The likely problem (having very little experience with this myself) is that you didn't specify your .nib file in your app's Info.plist...if you're building your app like a Windows .exe (or a Unix binary)--no .app bundle directory thing--you'll need to load the nib yourself (use the NSNib class). --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
|
||||||||||||||

