File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11-- @module =true
2+
23local gui = require (' gui' )
34local widgets = require (' gui.widgets' )
45local overlay = require (' plugins.overlay' )
2223
2324local function simulate_actions (self , count )
2425 count = sanitize_entry_count (count , 1 )
26+
2527 gui .simulateInput (dfhack .gui .getCurViewscreen (), ' STANDARDSCROLL_RIGHT' )
2628
2729 local function step (i )
@@ -36,12 +38,14 @@ local function simulate_actions(self, count)
3638 end
3739
3840 local viewscreen = dfhack .gui .getCurViewscreen ()
41+
3942 if self .action_mode ~= ' lock' then
4043 gui .simulateInput (viewscreen , ' SELECT' )
4144 end
4245 if self .action_mode ~= ' select' then
4346 gui .simulateInput (viewscreen , ' UNITLIST_SPECIALIZE' )
4447 end
48+
4549 gui .simulateInput (viewscreen , ' STANDARDSCROLL_DOWN' )
4650 gui .simulateInput (viewscreen , ' CONTEXT_SCROLL_DOWN' )
4751
@@ -89,6 +93,7 @@ function SelectLockOverlay:init()
8993 view_id = ' run_button' ,
9094 frame = {l = 1 , t = 3 },
9195 label = ' RUN' ,
96+ key = ' CUSTOM_R' , -- press 'r' to run
9297 on_activate = function ()
9398 if self .is_running then return end
9499 self .is_running = true
You can’t perform that action at this time.
0 commit comments