Creating extra window at start on Mac OS X

I’m trying to show an extra window before the main game window starts on Mac OS X. This is a NSWindow to present resolution settings etc.

Running the NSWindow and closing it changes the main menu completely. I seem to be just getting the near-empty menu from the closed custom window only, and quit does not function from the menu or keyboard shortcut.

Is there someway to reset or reload things after the custom window is closed? Or some other way I should be doing this?

Code (more or less):

static void Main(string[] args)
{
    NSApplication.Init();

    var window = new NSWindow(...);
    window.MakeKeyAndOrderFront(window);
    NSApplication.SharedApplication.RunModalForWindow(window);
    window.Close();
    window.Dispose();
    window = null;

    using (var game = new MyGame())
    {
        game.Run();
    }
}

Thanks…

I’m not familiar with this approach or OSX, but this sounds like it’d be possible through MonoGame and not require a native implementation. One option is to present this screen at the start then transition to the game when the user is ready all in the same window. Is there something specific you require from NSWindow?

Its an extra window to set graphics settings (full screen, windowed, resolution) and more at the beginning before main launch.

That can all be done through MonoGame’s API. You can have a game state that allows the user to set these options on start then transition to the main game afterwards. My apologies if I’m misunderstanding something.

The problem is, in the olden days pre-monogame, setting some anti-aliasing settings or invalid full screen resolution settings could in some cases result in the main game window not opening at all (graphics driver could not be created). That’s why I like to have a separate launcher window to allow the changing of the graphics settings before the main game gets launched, and is what I am trying to achieve here.