1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 14:09:06 +00:00

Use SDL2's MessageBox API.

This commit is contained in:
C.W. Betts 2014-04-06 19:28:56 -06:00
parent b437a7cb2c
commit 5d9f7c2c18
2 changed files with 9 additions and 2 deletions

View file

@ -807,12 +807,16 @@ std::vector<std::string> getFileList(std::string path, std::string type, int par
return list;
}
#if defined(BBGE_BUILD_MACOSX)
#if defined(BBGE_BUILD_MACOSX) && !SDL_VERSION_ATLEAST(2,0,0)
void cocoaMessageBox(const std::string &title, const std::string &msg);
#endif
void messageBox(const std::string& title, const std::string &msg)
{
#if SDL_VERSION_ATLEAST(2,0,0)
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, title.c_str(),
msg.c_str, NULL);
#else
#ifdef BBGE_BUILD_WINDOWS
MessageBox (0,msg.c_str(),title.c_str(),MB_OK);
#elif defined(BBGE_BUILD_MACOSX)
@ -823,6 +827,7 @@ void messageBox(const std::string& title, const std::string &msg)
#else
#error Please define your platform.
#endif
#endif
}
Vector getNearestPointOnLine(Vector a, Vector b, Vector c)

View file

@ -426,7 +426,9 @@ SET(AQUARIA_SRCS_UNUSED
)
IF(MACOSX)
SET(COCOA_SRCS "${BBGEDIR}/Cocoa.mm")
IF(AQUARIA_USE_SDL)
SET(COCOA_SRCS "${BBGEDIR}/Cocoa.mm")
ENDIF(AQUARIA_USE_SDL)
ENDIF(MACOSX)
# Bit Blot Game Engine sources...