mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
message box fix
This commit is contained in:
parent
f4e79a48f0
commit
08d2b80434
2 changed files with 11 additions and 6 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
|
||||
using namespace MWGui;
|
||||
|
||||
|
@ -102,5 +103,9 @@ void WindowManager::messageBox (const std::string& message, const std::vector<st
|
|||
std::cout << "message box: " << message << std::endl;
|
||||
|
||||
if (!buttons.empty())
|
||||
std::cerr << "error: message box buttons not supported" << std::endl;
|
||||
{
|
||||
std::cout << "buttons: ";
|
||||
std::copy (buttons.begin(), buttons.end(), std::ostream_iterator<std::string> (std::cout, ", "));
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<std::string> 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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue