Add debug inspector toggle for control-shift mouse click in UI

This commit is contained in:
MayaTheShy
2026-03-22 04:09:10 -04:00
parent 8a6896e276
commit f3c35afe07

View File

@@ -115,12 +115,16 @@ function UI:init()
local ie = Input:translate('mouse_up', button, x, y)
local currentPage = self:getActivePage()
if ie.code == 'control-shift-mouse_click' then -- hack
local event = currentPage:pointToChild(x, y)
_ENV.multishell.openTab(_ENV, {
path = 'sys/apps/Lua.lua',
args = { event.element, self, _ENV },
focused = true })
if ie.code == 'control-shift-mouse_click' then -- debug inspector
local Config = require('opus.config')
local debugCfg = Config.load('os', { debug_inspector = false })
if debugCfg.debug_inspector then
local event = currentPage:pointToChild(x, y)
_ENV.multishell.openTab(_ENV, {
path = 'sys/apps/Lua.lua',
args = { event.element, self, _ENV },
focused = true })
end
elseif ie and currentPage and currentPage.parent.device.side == side then
self:click(currentPage, ie)