Man page - sdl_showsimplemessagebox(3)

Packages contas this manual

Manual

SDL_ShowSimpleMessageBox(3) SDL3 FUNCTIONS SDL_ShowSimpleMessageBox(3)

SDL_ShowSimpleMessageBox - Display a simple modal message box.

Defined in SDL3/SDL_messagebox.h

#include "SDL3/SDL.h"
bool SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags flags, const char *title, const char *message, SDL_Window *window);

If your needs aren't complex, this function is preferred over

SDL_ShowMessageBox . flags may be any of the following:

SDL_MESSAGEBOX_ERROR : error dialog

SDL_MESSAGEBOX_WARNING : warning dialog

SDL_MESSAGEBOX_INFORMATION : informational
dialog

This function should be called on the thread that created the parent window, or on the main thread if the messagebox has no parent. It will block execution of that thread until the user clicks a button or closes the messagebox.

This function may be called at any time, even before

SDL_Init (). This makes it useful for reporting errors like a failure to create a renderer or OpenGL context.

On X11, SDL rolls its own dialog box with X11 primitives instead of a formal toolkit like GTK+ or Qt.

Note that if SDL_Init () would fail because there isn't any available video target, this function is likely to fail for the same reasons. If this is a concern, check the return value from this function and fall back to writing to stderr if you can.

an SDL_MessageBoxFlags
value.
UTF-8 title text.
UTF-8 message text.
the parent window, or NULL for no parent.

Returns true on success or false on failure; call

SDL_GetError () for more information.

This function is available since SDL 3.2.0.

(3), SDL_ShowMessageBox(3)

SDL 3.2.10 Simple Directmedia Layer