mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 19:15:33 +00:00
34 lines
616 B
C++
34 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);
|
|
}
|
|
}
|