feat: add Opus autorun script and grid single-click for touch

- Add autorun/startup.lua for Opus package integration:
  - Detects role from config files (.manager_config, .client_config, etc.)
  - Registers reboot listener as kernel hook
  - Launches program via shell.openForegroundTab()
  - Client role also opens dropperController in separate tab

- Override grid eventHandler on actionable grids (itemGrid, smeltTab,
  craftTab) to emit grid_select on single mouse_click, enabling
  monitor touch to trigger actions immediately instead of requiring
  double-click
This commit is contained in:
MayaTheShy
2026-03-22 17:17:56 -04:00
parent 38727c5eeb
commit 6f3a650e69
2 changed files with 119 additions and 1 deletions

View File

@@ -320,6 +320,18 @@ local function buildMainPage()
ratio = row.ratio or 0,
}
end,
-- Single-click triggers grid_select (for monitor touch)
eventHandler = function(self, event)
if event.type == 'mouse_click' then
local handled = UI.Grid.eventHandler(self, event)
if handled and self.selected then
self:emit({ type = 'grid_select', selected = self.selected, element = self })
end
return handled
end
return UI.Grid.eventHandler(self, event)
end,
},
-- Alert / status area
@@ -628,9 +640,20 @@ local function buildSmelterPage()
getRowTextColor = function(self, row, selected)
if selected then return colors.white end
-- Color the toggle column indicator
return colors.white
end,
-- Single-click triggers grid_select (for monitor touch)
eventHandler = function(self, event)
if event.type == 'mouse_click' then
local handled = UI.Grid.eventHandler(self, event)
if handled and self.selected then
self:emit({ type = 'grid_select', selected = self.selected, element = self })
end
return handled
end
return UI.Grid.eventHandler(self, event)
end,
},
},
@@ -671,6 +694,18 @@ local function buildSmelterPage()
{ heading = 'Go', key = 'goLabel', width = 6 },
},
values = {},
-- Single-click triggers grid_select (for monitor touch)
eventHandler = function(self, event)
if event.type == 'mouse_click' then
local handled = UI.Grid.eventHandler(self, event)
if handled and self.selected then
self:emit({ type = 'grid_select', selected = self.selected, element = self })
end
return handled
end
return UI.Grid.eventHandler(self, event)
end,
},
},