diff --git a/apps/openmw/mwgui/window_manager.cpp b/apps/openmw/mwgui/window_manager.cpp index 726cd5bd8..ed4085ea8 100644 --- a/apps/openmw/mwgui/window_manager.cpp +++ b/apps/openmw/mwgui/window_manager.cpp @@ -4,6 +4,7 @@ #include "console.hpp" #include +#include using namespace MWGui; @@ -95,3 +96,11 @@ void WindowManager::setValue (const std::string& id, const MWMechanics::DynamicS stats->setValue (id, value); hud->setValue (id, value); } + +void WindowManager::messageBox (const std::string& message, const std::vector& buttons) +{ + std::cout << "message box: " << message << std::endl; + + if (!buttons.empty()) + std::cerr << "error: message box buttons not supported" << std::endl; +} diff --git a/apps/openmw/mwgui/window_manager.hpp b/apps/openmw/mwgui/window_manager.hpp index a2e664d26..ea2d87bc9 100644 --- a/apps/openmw/mwgui/window_manager.hpp +++ b/apps/openmw/mwgui/window_manager.hpp @@ -11,6 +11,7 @@ */ #include +#include #include "../mwmechanics/stat.hpp" @@ -144,6 +145,8 @@ namespace MWGui void setValue (const std::string& id, const MWMechanics::DynamicStat& value); ///< Set value for the given ID. + + void messageBox (const std::string& message, const std::vector& buttons); }; } #endif diff --git a/apps/openmw/mwscript/interpretercontext.cpp b/apps/openmw/mwscript/interpretercontext.cpp index 404aa69a6..22a5aaa70 100644 --- a/apps/openmw/mwscript/interpretercontext.cpp +++ b/apps/openmw/mwscript/interpretercontext.cpp @@ -105,10 +105,7 @@ namespace MWScript void InterpreterContext::messageBox (const std::string& message, const std::vector& buttons) { - std::cout << "message box: " << message << std::endl; - - if (!buttons.empty()) - std::cerr << "error: message box buttons not supported" << std::endl; + mEnvironment.mWindowManager->messageBox (message, buttons); } bool InterpreterContext::menuMode()