mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Wrap Lua settings widgets into an Adapter widget
This commit is contained in:
parent
db9e734a6a
commit
086a7d9bc5
13 changed files with 168 additions and 44 deletions
|
@ -1,7 +1,6 @@
|
|||
#ifndef OPENMW_LUAUI_SCRIPTSETTINGS
|
||||
#define OPENMW_LUAUI_SCRIPTSETTINGS
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
|
@ -9,18 +8,19 @@
|
|||
|
||||
namespace LuaUi
|
||||
{
|
||||
class LuaAdapter;
|
||||
struct Element;
|
||||
struct ScriptSettingsPage
|
||||
{
|
||||
std::string mName;
|
||||
std::string mDescription;
|
||||
Element* mElement; // TODO: figure out if this can lead to use after free
|
||||
std::shared_ptr<Element> mElement;
|
||||
};
|
||||
size_t scriptSettingsPageCount();
|
||||
ScriptSettingsPage scriptSettingsPageAt(size_t index);
|
||||
void registerSettingsPage(const sol::table& options);
|
||||
void clearSettings();
|
||||
void attachToWidget(size_t index, MyGUI::Widget* widget = nullptr);
|
||||
void attachPageAt(size_t index, LuaAdapter* adapter);
|
||||
}
|
||||
|
||||
#endif // !OPENMW_LUAUI_SCRIPTSETTINGS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue