| 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() |
no test coverage detected