Added a metatable to the GUI table that has an __index that points to the GUI clr

This commit is contained in:
EvilFactory
2023-03-28 19:20:49 -03:00
parent 2b37abf264
commit 728796494e

View File

@@ -64,8 +64,16 @@ defaultLib["GUI"] = {
Anchor = CreateStatic("Barotrauma.Anchor"),
Alignment = CreateStatic("Barotrauma.Alignment"),
Pivot = CreateStatic("Barotrauma.Pivot"),
SoundType = CreateEnum("Barotrauma.GUISoundType"),
CursorState = CreateEnum("Barotrauma.CursorState"),
}
setmetatable(defaultLib["GUI"], {
__index = function (table, key)
return defaultLib["GUI"].GUI[key]
end
})
AddCallMetaTable(defaultLib["GUI"].VideoPlayer.VideoSettings)
AddCallMetaTable(defaultLib["GUI"].VideoPlayer.TextSettings)