forked from mirror/openmw-tes3mp
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 "console.hpp"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
|
|
||||||
|
@ -95,3 +96,11 @@ void WindowManager::setValue (const std::string& id, const MWMechanics::DynamicS
|
||||||
stats->setValue (id, value);
|
stats->setValue (id, value);
|
||||||
hud->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 <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "../mwmechanics/stat.hpp"
|
#include "../mwmechanics/stat.hpp"
|
||||||
|
|
||||||
|
@ -144,6 +145,8 @@ namespace MWGui
|
||||||
|
|
||||||
void setValue (const std::string& id, const MWMechanics::DynamicStat<int>& value);
|
void setValue (const std::string& id, const MWMechanics::DynamicStat<int>& value);
|
||||||
///< Set value for the given ID.
|
///< Set value for the given ID.
|
||||||
|
|
||||||
|
void messageBox (const std::string& message, const std::vector<std::string>& buttons);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -105,10 +105,7 @@ namespace MWScript
|
||||||
void InterpreterContext::messageBox (const std::string& message,
|
void InterpreterContext::messageBox (const std::string& message,
|
||||||
const std::vector<std::string>& buttons)
|
const std::vector<std::string>& buttons)
|
||||||
{
|
{
|
||||||
std::cout << "message box: " << message << std::endl;
|
mEnvironment.mWindowManager->messageBox (message, buttons);
|
||||||
|
|
||||||
if (!buttons.empty())
|
|
||||||
std::cerr << "error: message box buttons not supported" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InterpreterContext::menuMode()
|
bool InterpreterContext::menuMode()
|
||||||
|
|
Loading…
Reference in a new issue