mirror of https://github.com/OpenMW/openmw.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
700 B
C++
38 lines
700 B
C++
3 years ago
|
#include "scriptsettings.hpp"
|
||
|
|
||
|
#include <map>
|
||
|
|
||
|
#include "element.hpp"
|
||
|
|
||
|
namespace LuaUi
|
||
|
{
|
||
|
namespace
|
||
|
{
|
||
|
std::vector<ScriptSettings> allSettings;
|
||
|
}
|
||
|
|
||
|
const std::vector<ScriptSettings>& scriptSettings()
|
||
|
{
|
||
|
return allSettings;
|
||
|
}
|
||
|
|
||
|
void registerSettings(const ScriptSettings& script)
|
||
|
{
|
||
|
allSettings.push_back(script);
|
||
|
}
|
||
|
|
||
|
void clearSettings()
|
||
|
{
|
||
|
allSettings.clear();
|
||
|
}
|
||
|
|
||
|
void attachToWidget(const ScriptSettings& script, MyGUI::Widget* widget)
|
||
|
{
|
||
|
WidgetExtension* root = script.mElement->mRoot;
|
||
|
if (!root)
|
||
|
return;
|
||
|
root->widget()->attachToWidget(widget);
|
||
|
root->updateCoord();
|
||
|
}
|
||
|
}
|