diff --git a/apps/openmw/mwlua/uibindings.cpp b/apps/openmw/mwlua/uibindings.cpp index 16bd4a1626..8d9892005c 100644 --- a/apps/openmw/mwlua/uibindings.cpp +++ b/apps/openmw/mwlua/uibindings.cpp @@ -109,13 +109,8 @@ namespace MWLua luaManager->addUIMessage(message, mode); }; - api["showInteractiveMessage"] = [windowManager](std::string_view message, sol::optional options) { - std::string buttonText = "#{Interface:OK}"; - if (options) - { - buttonText = options->get_or("buttonText", buttonText); - } - windowManager->interactiveMessageBox(message, { buttonText }); + api["_showInteractiveMessage"] = [windowManager](std::string_view message, sol::optional) { + windowManager->interactiveMessageBox(message, { "#{Interface:OK}" }); }; api["CONSOLE_COLOR"] = LuaUtil::makeStrictReadOnly(LuaUtil::tableFromPairs(lua, { diff --git a/files/data/scripts/omw/ui.lua b/files/data/scripts/omw/ui.lua index 31502fd6ee..b10dc0c2ef 100644 --- a/files/data/scripts/omw/ui.lua +++ b/files/data/scripts/omw/ui.lua @@ -254,6 +254,13 @@ return { -- @return #boolean isWindowVisible = isWindowVisible, + --- + -- Shows a message as an interactive message box pausing the game, with a single button with the localized text OK. + -- @function [parent=#UI] showInteractiveMessage + -- @param #string message Message to display + -- @param #table options Options (none yet) + showInteractiveMessage = ui._showInteractiveMessage + -- TODO -- registerHudElement = function(name, showFn, hideFn) end, -- showHudElement = function(name, bool) end, diff --git a/files/lua_api/openmw/ui.lua b/files/lua_api/openmw/ui.lua index 73655a8428..598fbacca4 100644 --- a/files/lua_api/openmw/ui.lua +++ b/files/lua_api/openmw/ui.lua @@ -35,19 +35,6 @@ -- @field Flex Aligns widgets in a row or column -- @field Container Automatically wraps around its contents ---- --- Shows given message as a message box --- @function [parent=#ui] showInteractiveMessage --- @param #string msg --- @param #table options An optional table with additional optional arguments. Can contain: --- --- * `buttonText` - Changes the text of the button (default: OK (localized)) - --- @usage local params = { --- buttonText="Bene" --- }; --- ui.showInteractiveMessage("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque quis justo in orci pharetra semper in lobortis tortor. Suspendisse et sapien sapien.", params) - --- -- Shows given message at the bottom of the screen. -- @function [parent=#ui] showMessage