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 ie = Input:translate('mouse_up', button, x, y)
|
||||||
local currentPage = self:getActivePage()
|
local currentPage = self:getActivePage()
|
||||||
|
|
||||||
if ie.code == 'control-shift-mouse_click' then -- hack
|
if ie.code == 'control-shift-mouse_click' then -- debug inspector
|
||||||
local event = currentPage:pointToChild(x, y)
|
local Config = require('opus.config')
|
||||||
_ENV.multishell.openTab(_ENV, {
|
local debugCfg = Config.load('os', { debug_inspector = false })
|
||||||
path = 'sys/apps/Lua.lua',
|
if debugCfg.debug_inspector then
|
||||||
args = { event.element, self, _ENV },
|
local event = currentPage:pointToChild(x, y)
|
||||||
focused = true })
|
_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
|
elseif ie and currentPage and currentPage.parent.device.side == side then
|
||||||
self:click(currentPage, ie)
|
self:click(currentPage, ie)
|
||||||
|
|||||||
Reference in New Issue
Block a user