MCPcopy Create free account
hub / github.com/OpenMW/openmw / parse

Function parse

components/lua_ui/scriptsettings.cpp:15–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 {
14 std::vector<sol::table> allPages;
15 ScriptSettingsPage parse(const sol::table& options)
16 {
17 auto name = options.get_or("name", std::string());
18 auto searchHints = options.get_or("searchHints", std::string());
19 auto element = options.get_or<std::shared_ptr<LuaUi::Element>>("element", nullptr);
20 if (name.empty())
21 Log(Debug::Warning) << "A script settings page has an empty name";
22 if (!element.get())
23 Log(Debug::Warning) << "A script settings page has no UI element assigned";
24 return { std::move(name), std::move(searchHints), std::move(element) };
25 }
26 }
27
28 size_t scriptSettingsPageCount()

Callers 2

scriptSettingsPageAtFunction · 0.70
attachPageAtFunction · 0.70

Calls 4

LogClass · 0.85
get_orMethod · 0.45
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected