From 2185fd29c5ecd149fabeea83f84a82b6beb54d6a Mon Sep 17 00:00:00 2001 From: uramer Date: Tue, 1 Feb 2022 19:26:05 +0100 Subject: [PATCH] Document ui.registerSettingsPage --- files/lua_api/openmw/ui.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/files/lua_api/openmw/ui.lua b/files/lua_api/openmw/ui.lua index c60a4e1abd..997c39780e 100644 --- a/files/lua_api/openmw/ui.lua +++ b/files/lua_api/openmw/ui.lua @@ -36,6 +36,11 @@ -- @param #Layout layout -- @return #Element +--- +-- Adds a settings page to main menu setting's Scripts tab. +-- @function [parent=#ui] regregisterSettingsPageister +-- @param #SettingsPage page + --- -- Layout -- @type Layout @@ -137,4 +142,11 @@ -- @field openmw.util#Vector2 offset Position of the mouse cursor relative to the widget -- @field #number button Mouse button which triggered the event (could be nil) +--- +-- Settings page parameters, passed as an argument to uyi.registerSettingsPage +-- @type SettingsPage +-- @field #string name Name of the page, displayed in the list, used for search +-- @field #string searchHints Additional keywords used in search, not displayed anywhere +-- @field #Element element The page's UI, which will be attached to the settings tab. The root widget has to have a fixed size (set `size` field in `props`, see Widget documentation, `relativeSize` is ignored) + return nil