From 08d2b804344e3c41e2daf08588ab7dd76010adfb Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sun, 22 Aug 2010 12:56:35 +0200 Subject: [PATCH] message box fix --- apps/openmw/mwgui/window_manager.cpp | 7 ++++++- components/interpreter/miscopcodes.hpp | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwgui/window_manager.cpp b/apps/openmw/mwgui/window_manager.cpp index ed4085ea8..1752743f7 100644 --- a/apps/openmw/mwgui/window_manager.cpp +++ b/apps/openmw/mwgui/window_manager.cpp @@ -5,6 +5,7 @@ #include #include +#include using namespace MWGui; @@ -102,5 +103,9 @@ void WindowManager::messageBox (const std::string& message, const std::vector (std::cout, ", ")); + std::cout << std::endl; + } } diff --git a/components/interpreter/miscopcodes.hpp b/components/interpreter/miscopcodes.hpp index 7e7dcd18a..fbee0aa26 100644 --- a/components/interpreter/miscopcodes.hpp +++ b/components/interpreter/miscopcodes.hpp @@ -19,6 +19,11 @@ namespace Interpreter virtual void execute (Runtime& runtime, unsigned int arg0) { + // message + int index = runtime[0].mInteger; + runtime.pop(); + std::string message = runtime.getStringLiteral (index); + // buttons std::vector buttons; @@ -31,11 +36,6 @@ namespace Interpreter std::reverse (buttons.begin(), buttons.end()); - // message - int index = runtime[0].mInteger; - runtime.pop(); - std::string message = runtime.getStringLiteral (index); - // additional parameters std::string formattedMessage;