Add debug inspector toggle for control-shift mouse click in UI
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user