summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/require/UI.lua
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2024-08-28 10:23:53 -0400
committerGitHub <noreply@github.com>2024-08-28 10:23:53 -0400
commit6f454ad8366ed33bbe199c3fc3ed69e6d3448cec (patch)
tree05f856f85c00194c6c43ca23cacb7021a50ffa33 /indra/newview/scripts/lua/require/UI.lua
parentc225b44a59ddd6b84105ace4181b3ca9f7439bfa (diff)
parent7b21acd39745d265548eeb62d687cde9febb1f7a (diff)
Merge pull request #2416 from secondlife/lua-lazymod
Allow UI to have lazily-loaded submodules.
Diffstat (limited to 'indra/newview/scripts/lua/require/UI.lua')
-rw-r--r--indra/newview/scripts/lua/require/UI.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/scripts/lua/require/UI.lua b/indra/newview/scripts/lua/require/UI.lua
index 464e6547ea..bbcae3514a 100644
--- a/indra/newview/scripts/lua/require/UI.lua
+++ b/indra/newview/scripts/lua/require/UI.lua
@@ -1,10 +1,13 @@
-- Engage the viewer's UI
local leap = require 'leap'
-local Timer = (require 'timers').Timer
local mapargs = require 'mapargs'
+local Timer = (require 'timers').Timer
+local util = require 'util'
-local UI = {}
+-- Allow lazily accessing UI submodules on demand, e.g. a reference to
+-- UI.Floater lazily loads the UI/Floater module.
+local UI = util.submoduledir({}, 'UI')
-- ***************************************************************************
-- registered menu actions