2022-01-25 20:53:00 +00:00
|
|
|
#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();
|
|
|
|
}
|
|
|
|
|
2022-01-28 20:35:05 +00:00
|
|
|
void attachToWidget(size_t index, MyGUI::Widget* widget)
|
2022-01-25 20:53:00 +00:00
|
|
|
{
|
2022-01-28 20:45:13 +00:00
|
|
|
if (index < allSettings.size())
|
2022-01-28 20:35:05 +00:00
|
|
|
allSettings[index].mElement->attachToWidget(widget);
|
2022-01-25 20:53:00 +00:00
|
|
|
}
|
|
|
|
}
|