forked from teamnwah/openmw-tes3coop
routed message box output through window manager
This commit is contained in:
parent
09a258253c
commit
17135a6403
3 changed files with 13 additions and 4 deletions
|
@ -4,6 +4,7 @@
|
|||
#include "console.hpp"
|
||||
|
||||
#include <assert.h>
|
||||
#include <iostream>
|
||||
|
||||
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<std::string>& buttons)
|
||||
{
|
||||
std::cout << "message box: " << message << std::endl;
|
||||
|
||||
if (!buttons.empty())
|
||||
std::cerr << "error: message box buttons not supported" << std::endl;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "../mwmechanics/stat.hpp"
|
||||
|
||||
|
@ -144,6 +145,8 @@ namespace MWGui
|
|||
|
||||
void setValue (const std::string& id, const MWMechanics::DynamicStat<int>& value);
|
||||
///< Set value for the given ID.
|
||||
|
||||
void messageBox (const std::string& message, const std::vector<std::string>& buttons);
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -105,10 +105,7 @@ namespace MWScript
|
|||
void InterpreterContext::messageBox (const std::string& message,
|
||||
const std::vector<std::string>& 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()
|
||||
|
|
Loading…
Reference in a new issue