1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-18 09:46:40 +00:00

isWindowVisible must handle replaced windows' visibility

This commit is contained in:
Mads Buvik Sandvei 2025-02-19 14:59:05 +01:00
parent 9fe420e562
commit b1f32c8cee

View file

@ -155,6 +155,13 @@ local function onUiModeChangedEvent(data)
end end
end end
local function isWindowVisible(windowName)
if replacedWindows[windowName] then
return replacedWindows[windowName].visible
end
return ui._isWindowVisible(windowName)
end
return { return {
interfaceName = 'UI', interfaceName = 'UI',
--- ---
@ -245,7 +252,7 @@ return {
-- @function [parent=#UI] isWindowVisible -- @function [parent=#UI] isWindowVisible
-- @param #string windowName -- @param #string windowName
-- @return #boolean -- @return #boolean
isWindowVisible = ui._isWindowVisible, isWindowVisible = isWindowVisible,
-- TODO -- TODO
-- registerHudElement = function(name, showFn, hideFn) end, -- registerHudElement = function(name, showFn, hideFn) end,