Skip to content

Commit 130bc6b

Browse files
committed
update docs, navigate help by clicking
1 parent 2a02385 commit 130bc6b

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

docs/gui/launcher.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
gui/launcher
22
============
3-
Tags: fort, adventure, legends, system
3+
Tags: system
44
:dfhack-keybind:`gui/launcher`
55

66
In-game DFHack command launcher with integrated help. It is the primary GUI
@@ -36,9 +36,10 @@ where the dialog does not reappear to show you the command output, the output
3636
As you type, autocomplete options for DFHack commands appear in the right
3737
column. If the first word of what you've typed matches a valid command, then the
3838
autocomplete options will also include commands that have similar functionality
39-
to the one that you've named. Hit :kbd:`Tab` or :kbd:`Shift`:kbd:`Tab` to cycle
40-
through the autocomplete options. Hit :kbd:`Alt`:kbd:`Left` if you want to undo
41-
the autocomplete and go back to the text you had before you hit :kbd:`Tab`.
39+
to the one that you've named. Click on an autocomplete option to select it or
40+
cycle through them with :kbd:`Tab` or :kbd:`Shift`:kbd:`Tab`. Hit
41+
:kbd:`Alt`:kbd:`Left` if you want to undo the autocomplete and go back to the
42+
text you had before you autocompleted.
4243

4344
**Context-sensitive help**
4445

@@ -47,8 +48,9 @@ information in the help area about how to get started.
4748

4849
Once you have typed (or autocompleted) a word that matches a valid command, the
4950
help area shows the help for that command, including usage instructions. You can
50-
scroll the help text page by page with :kbd:`PgUp` and :kbd:`PgDn` or line by
51-
line with :kbd:`Ctrl`:kbd:`Up` and :kbd:`Ctrl`:kbd:`Down`.
51+
scroll the help text page by page by left/right clicking or with :kbd:`PgUp` and
52+
:kbd:`PgDn`. You can also scroll line by line with :kbd:`Ctrl`:kbd:`Up` and
53+
:kbd:`Ctrl`:kbd:`Down`.
5254

5355
**Command history**
5456

gui/launcher.lua

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,20 @@ function HelpPanel:set_entry(entry_name)
299299
self:set_help(helpdb.get_entry_long_help(entry_name))
300300
end
301301

302+
function HelpPanel:onInput(keys)
303+
if HelpPanel.super.onInput(self, keys) then
304+
return true
305+
elseif keys._MOUSE_L and self:getMousePos() then
306+
local label = self.subviews.help_label
307+
label:scroll(label.frame_body.height)
308+
return true
309+
elseif keys._MOUSE_R and self:getMousePos() then
310+
local label = self.subviews.help_label
311+
label:scroll(-label.frame_body.height)
312+
return true
313+
end
314+
end
315+
302316
----------------------------------
303317
-- LauncherUI
304318
--

0 commit comments

Comments
 (0)