From 539ee7788832eff6fb09588a6815b8829ee7da5f Mon Sep 17 00:00:00 2001 From: uramer Date: Mon, 30 Jan 2023 23:29:00 +0100 Subject: [PATCH] Note Layout names colliding with Content methods --- files/lua_api/openmw/ui.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/files/lua_api/openmw/ui.lua b/files/lua_api/openmw/ui.lua index 164d8768a9..1638aa4e71 100644 --- a/files/lua_api/openmw/ui.lua +++ b/files/lua_api/openmw/ui.lua @@ -172,6 +172,12 @@ -- for i = 1, #content do -- print('widget',content[i].name,'at',i) -- end +-- @usage +-- -- Note: layout names can collide with method names. Because of that you can't use a layout name such as "insert": +-- local content = ui.content { +-- { name = 'insert '} +-- } +-- content.insert.content = ui.content {} -- fails here, content.insert is a function! --- -- Puts the layout at given index by shifting all the elements after it