GFX2_MessageBox()

Especially useful to display startup errors
This commit is contained in:
Thomas Bernard
2020-05-05 21:39:20 +02:00
parent 80ff6f7dfd
commit b0f1117bbc
5 changed files with 158 additions and 8 deletions

View File

@@ -94,4 +94,23 @@ void Set_mouse_position(void);
*/
int GFX2_GetScreenSize(int * width, int * height);
#if defined(USE_SDL2)
#define GFX2_MB_INFO SDL_MESSAGEBOX_INFORMATION
#define GFX2_MB_ERROR SDL_MESSAGEBOX_ERROR
#define GFX2_MB_WARNING SDL_MESSAGEBOX_WARNING
#elif defined(WIN32)
#define GFX2_MB_INFO MB_OK
#define GFX2_MB_ERROR (MB_OK|MB_ICONERROR)
#define GFX2_MB_WARNING (MB_OK|MB_ICONWARNING)
#else
#define GFX2_MB_INFO 1
#define GFX2_MB_ERROR 2
#define GFX2_MB_WARNING 3
#endif
/**
* Display a modal message
*/
int GFX2_MessageBox(const char * text, const char * caption, unsigned int type);
#endif // SCREEN_H_INCLUDED