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.
openmw/components/lua_ui/scriptsettings.cpp

38 lines
700 B
C++

#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();
}
}