1
0
Fork 0

modalMessageBox: Support for the runtime headless mode.

The caption, message, and additional text are instead output via SG_LOG().
This commit is contained in:
Edward d'Auvergne 2018-06-11 08:52:34 +02:00
parent 2aa8d8ccbf
commit 3e4132e660

View file

@ -111,6 +111,15 @@ MessageBoxResult modalMessageBox(const std::string& caption,
const std::string& msg,
const std::string& moreText)
{
// Headless mode.
if (globals->is_headless()) {
SG_LOG(SG_HEADLESS, SG_ALERT, "ModalMessageBox Caption: \"" << caption << "\"");
SG_LOG(SG_HEADLESS, SG_ALERT, "ModalMessageBox Message: \"" << msg << "\"");
if (!moreText.empty())
SG_LOG(SG_HEADLESS, SG_ALERT, "ModalMessageBox More text: \"" << moreText << "\"");
return MSG_BOX_OK;
}
// prefer canvas
if (isCanvasImplementationRegistered()) {
SGPropertyNode_ptr args(new SGPropertyNode);