I want to do system-message style errors in my game (mostly just for my own debugging). I don’t want to tie to windows platform so I don’t want to use Winforms MessageBox. However, I see in the Monogame documentation that XNA includes a MessageBox class:
My version of XNA does not seem to have it. I might be slightly outdated as I haven’t worked on my games in the last half-year. Is this a new feature? Or is this an old feature that was removed? I’m just curious when this was added / if it really exists, as I can’t find much info on it and it doesn’t seem to be in my XNA.
Yeah it’s working in WindowsDX but not implemented in DesktopGL, which is strange when DesktopGL uses SDL2 which could use ShowSimpleMessageBox (SDL2/SDL_ShowSimpleMessageBox - SDL Wiki).
If you build from source you can add the following to get this function working:
SDL2.cs Init
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void d_sdl_showSimpleMessageBox(UInt32 flags, IntPtr title, IntPtr message, IntPtr window);
public static d_sdl_showSimpleMessageBox SDL_ShowSimpleMessageBox = FuncLoader.LoadFunction<d_sdl_showSimpleMessageBox>(NativeLibrary, "SDL_ShowSimpleMessageBox");