#include "scriptsettings.hpp" #include #include "element.hpp" namespace LuaUi { namespace { std::vector allSettings; } const std::vector& 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(); } }