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

35 lines
616 B
C++

#include "scriptsettings.hpp"
#include <map>
#include "element.hpp"
namespace LuaUi
{
namespace
{
std::vector<ScriptSettingsPage> allPages;
}
const std::vector<ScriptSettingsPage>& scriptSettingsPages()
{
return allPages;
}
void registerSettingsPage(const ScriptSettingsPage& page)
{
allPages.push_back(page);
}
void clearSettings()
{
allPages.clear();
}
void attachToWidget(size_t index, MyGUI::Widget* widget)
{
if (index < allPages.size())
allPages[index].mElement->attachToWidget(widget);
}
}