diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-09-16 09:16:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-16 09:16:48 -0400 |
commit | ecd5aa227653d9b690a14c1d9c1dd90ea644fec5 (patch) | |
tree | 97ba944cc0a9a4e866c2cef484c6e23c7ac4876b /indra/newview | |
parent | 611ba19457da6dc1daf11b23cca973ad788b51ba (diff) | |
parent | 328bdeb3cc26648060a3d7331ccdb80539953f33 (diff) |
Merge pull request #2574 from secondlife/lua-consoles
Restore LUA debug consoles in viewer menu and tie visibility to feature flag (from #2571)
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/scripts/lua/auto/menus.lua | 51 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 31 |
2 files changed, 31 insertions, 51 deletions
diff --git a/indra/newview/scripts/lua/auto/menus.lua b/indra/newview/scripts/lua/auto/menus.lua deleted file mode 100644 index b2f54d83df..0000000000 --- a/indra/newview/scripts/lua/auto/menus.lua +++ /dev/null @@ -1,51 +0,0 @@ --- Inject Lua-related menus into the top menu structure. Run this as a Lua --- script so that turning off the Lua feature also disables these menus. - --- Under Develop -> Consoles, want to present the equivalent of: --- <menu_item_separator/> --- <menu_item_check --- label="LUA Debug Console" --- name="LUA Debug Console"> --- <menu_item_check.on_check --- function="Floater.Visible" --- parameter="lua_debug" /> --- <menu_item_check.on_click --- function="Floater.Toggle" --- parameter="lua_debug" /> --- </menu_item_check> --- <menu_item_check --- label="LUA Scripts Info" --- name="LUA Scripts"> --- <menu_item_check.on_check --- function="Floater.Visible" --- parameter="lua_scripts" /> --- <menu_item_check.on_click --- function="Floater.Toggle" --- parameter="lua_scripts" /> --- </menu_item_check> - -local startup = require 'startup' -local UI = require 'UI' - --- Don't mess with the viewer's menu structure until we've logged in. -startup.wait('STATE_STARTED') - --- Add LUA Debug Console to Develop->Consoles -local pos = 9 -UI.addMenuSeparator{ - parent_menu='Consoles', pos=pos, -} -pos += 1 -UI.addMenuItem{ - parent_menu='Consoles', pos=pos, - name='lua_debug', label='LUA Debug Console', - func='Floater.ToggleOrBringToFront', param='lua_debug', -} -pos += 1 - --- Add LUA Scripts Info to Develop->Consoles -UI.addMenuItem{ - parent_menu='Consoles', pos=pos, - name='lua_scripts', label='LUA Scripts Info', - func='Floater.ToggleOrBringToFront', param='lua_scripts', -} diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 324e868bd5..f4864dabef 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2583,6 +2583,37 @@ function="World.EnvPreset" parameter="scene monitor" /> </menu_item_check> <menu_item_separator/> + <menu_item_check + label="LUA Debug Console" + name="LUA Debug Console"> + <menu_item_check.on_check + function="Floater.Visible" + parameter="lua_debug" /> + <menu_item_check.on_click + function="Floater.Toggle" + parameter="lua_debug" /> + <menu_item_check.on_visible + function="CheckControl" + parameter="LuaFeature" /> + </menu_item_check> + <menu_item_check + label="LUA Scripts Info" + name="LUA Scripts"> + <menu_item_check.on_check + function="Floater.Visible" + parameter="lua_scripts" /> + <menu_item_check.on_click + function="Floater.Toggle" + parameter="lua_scripts" /> + <menu_item_check.on_visible + function="CheckControl" + parameter="LuaFeature" /> + </menu_item_check> + <menu_item_separator> + <menu_item_separator.on_visible + function="CheckControl" + parameter="LuaFeature"/> + </menu_item_separator> <menu_item_call label="Region Info to Debug Console" |