2022-01-25 21:53:00 +01:00
|
|
|
#ifndef OPENMW_LUAUI_SCRIPTSETTINGS
|
|
|
|
#define OPENMW_LUAUI_SCRIPTSETTINGS
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
#include <string_view>
|
|
|
|
|
|
|
|
#include <MyGUI_Widget.h>
|
|
|
|
|
|
|
|
namespace LuaUi
|
|
|
|
{
|
2022-01-28 21:45:13 +01:00
|
|
|
struct Element;
|
2022-01-29 13:22:08 +01:00
|
|
|
struct ScriptSettingsPage
|
2022-01-25 21:53:00 +01:00
|
|
|
{
|
|
|
|
std::string mName;
|
2022-01-29 16:59:43 +01:00
|
|
|
std::string mDescription;
|
2022-01-25 21:53:00 +01:00
|
|
|
Element* mElement; // TODO: figure out if this can lead to use after free
|
|
|
|
};
|
2022-01-29 18:33:14 +01:00
|
|
|
size_t scriptSettingsPageCount();
|
|
|
|
ScriptSettingsPage scriptSettingsPageAt(size_t index);
|
|
|
|
void registerSettingsPage(const sol::table& options);
|
2022-01-25 21:53:00 +01:00
|
|
|
void clearSettings();
|
2022-01-28 21:35:05 +01:00
|
|
|
void attachToWidget(size_t index, MyGUI::Widget* widget = nullptr);
|
2022-01-25 21:53:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // !OPENMW_LUAUI_SCRIPTSETTINGS
|