Skip to content

Commit 50adca3

Browse files
committed
add tag filtering interface for gui/launcher
1 parent 6549e57 commit 50adca3

File tree

3 files changed

+354
-81
lines changed

3 files changed

+354
-81
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Template for new versions:
7171
- `gui/mod-manager`: will automatically unmark the default mod profile from being the default if it fails to load (due to missing or incompatible mods)
7272
- `gui/quickfort`: can now dynamically adjust the dig priority of tiles designated by dig blueprints
7373
- `gui/quickfort`: can now opt to apply dig blueprints in marker mode
74+
- `gui/launcher`: add interface for browsing and filtering commands by tags
7475

7576
## Removed
7677
- `gui/manager-quantity`: the vanilla UI can now modify manager order quantities after creation

docs/gui/launcher.rst

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ Examples
2828
Open the launcher dialog in minimal mode with a blank initial commandline.
2929
``gui/launcher prospect --show ores,veins``
3030
Open the launcher dialog with the edit area pre-populated with the given
31-
command, ready for modification or running. Tools related to ``prospect``
32-
will appear in the autocomplete list, and help text for ``prospect`` will be
33-
displayed in the lower panel.
31+
command, ready for modification or running. Tools related to
32+
`prospect <prospector>` will appear in the autocomplete list, and help text
33+
for ``prospect`` will be displayed in the lower panel.
3434

3535
Editing and running commands
3636
----------------------------
3737

3838
Enter the command you want to run by typing its name. If you want to start over,
39-
:kbd:`Ctrl`:kbd:`C` will clear the line. When you are happy with the command,
39+
:kbd:`Ctrl`:kbd:`X` will clear the line. When you are happy with the command,
4040
hit :kbd:`Enter` or click on the ``run`` button to run it. Any output from the
4141
command will appear in the lower panel after you run it. If you want to run the
4242
command but close the dialog immediately so you can get back to the game, hold
@@ -49,63 +49,72 @@ find it later.
4949
To pause or unpause the game while `gui/launcher` is open, hit the spacebar once
5050
or twice. If you are typing a command, the first space will go into the edit box
5151
for your commandline. If the commandline is empty or if it already ends in a
52-
space, space key will be passed through to the game to affect the pause button.
52+
space, the space key will be passed through to the game to affect the pause
53+
button.
5354

5455
If your keyboard layout makes any key impossible to type (such as :kbd:`[` and
5556
:kbd:`]` on German QWERTZ keyboards), use :kbd:`Ctrl`:kbd:`Shift`:kbd:`K` to
5657
bring up the on-screen keyboard. You can "type" the text you need by clicking
57-
on the characters with the mouse.
58+
on the characters with the mouse and then clicking the ``Enter`` button to
59+
send the text to the launcher editor.
5860

5961
Autocomplete
6062
------------
6163

6264
As you type, autocomplete options for DFHack commands appear in the right
63-
column. If the first word of what you've typed matches a valid command, then the
64-
autocomplete options will also include commands that have similar functionality
65-
to the one that you've named. Click on an autocomplete list option to select it
66-
or cycle through them with :kbd:`Shift`:kbd:`Left` and :kbd:`Shift`:kbd:`Right`.
67-
You can run a command quickly without parameters by double-clicking on the tool
68-
name in the list. Holding down shift while you double-click allows you to
69-
run the command and close `gui/launcher` at the same time.
65+
column. You can restrict which commands are shown in the autocomplete list by
66+
setting the tag filter with :kbd:`Ctrl`:kbd:`W` or by clicking on the ``Tags``
67+
button. If the first word of what you've typed matches a valid command, then the
68+
autocomplete options switch to showing commands that have similar functionality
69+
to the one that you've typed. Click on an autocomplete list option to select it
70+
or cycle through them with :kbd:`Tab` and :kbd:`Shift`:kbd:`Tab`. You can run a
71+
command quickly without parameters by double-clicking on the tool name in the
72+
list. Holding down shift while you double-click allows you to run the command
73+
and close `gui/launcher` at the same time.
7074

7175
Context-sensitive help and command output
7276
-----------------------------------------
7377

7478
When you start ``gui/launcher`` without parameters, it shows some useful
75-
information in the lower panel about how to get started with browsing DFHack
76-
tools by their category `tags`.
79+
information in the lower panel about how to get started with DFHack.
7780

7881
Once you have typed (or autocompleted) a word that matches a valid command, the
7982
lower panel shows the help for that command, including usage instructions and
80-
examples. You can scroll the help text with the mouse or with :kbd:`PgUp` and
81-
:kbd:`PgDn`. You can also scroll line by line with :kbd:`Shift`:kbd:`Up` and
83+
examples. You can scroll the help text with the mouse wheel or with :kbd:`PgUp`
84+
and :kbd:`PgDn`. You can also scroll line by line with :kbd:`Shift`:kbd:`Up` and
8285
:kbd:`Shift`:kbd:`Down`.
8386

8487
Once you run a command, the lower panel will switch to command output mode,
8588
where you can see any text the command printed to the screen. If you want to
86-
see more help text as you run further commands, you can switch the lower panel
87-
back to help mode with :kbd:`Ctrl`:kbd:`T`. The output text is kept for all the
88-
commands you run while the launcher window is open (up to 256KB of text), but
89-
only the most recent 32KB of text is saved if you dismiss the launcher window
90-
and bring it back up. Command output is also printed to the external DFHack
91-
console (the one you can show with `show` on Windows) or the parent terminal on
92-
Unix-based systems if you need a longer history of the output.
89+
see more help text as you browse further commands, you can switch the lower
90+
panel back to help mode with :kbd:`Ctrl`:kbd:`T`. The output text is kept for
91+
all the commands you run while the launcher window is open (up to 256KB of
92+
text), but only the most recent 32KB of text is saved if you dismiss the
93+
launcher window and bring it back up. Command output is also printed to the
94+
external DFHack console (the one you can show with `show` on Windows) or the
95+
parent terminal on Unix-based systems if you need a longer history of the
96+
output.
9397

9498
Command history
9599
---------------
96100

97101
``gui/launcher`` keeps a history of commands you have run to let you quickly run
98102
those commands again. You can scroll through your command history with the
99-
:kbd:`Up` and :kbd:`Down` arrow keys, or you can search your history for
103+
:kbd:`Up` and :kbd:`Down` arrow keys. You can also search your history for
100104
something specific with the :kbd:`Alt`:kbd:`S` hotkey. When you hit
101105
:kbd:`Alt`:kbd:`S`, start typing to search your history for a match. To find the
102106
next match for what you've already typed, hit :kbd:`Alt`:kbd:`S` again. You can
103107
run the matched command immediately with :kbd:`Enter`, or hit :kbd:`Esc` to edit
104108
the command before running it.
105109

106-
Dev mode
107-
--------
110+
Default tag filters
111+
-------------------
108112

109113
By default, commands intended for developers and modders are filtered out of the
110-
autocomplete list. This includes any tools tagged with ``unavailable``. You can
111-
toggle this filtering by hitting :kbd:`Alt`:kbd:`D` at any time.
114+
autocomplete list. This includes any tools tagged with ``unavailable``. If you
115+
have "mortal mode" enabled in the `gui/control-panel` preferences, any tools
116+
with the ``armok`` tag are filterd out as well.
117+
118+
You can toggle this default filtering by hitting :kbd:`Alt`:kbd:`D` to switch
119+
into "Dev mode" at any time. You can also adjust your command filters in the
120+
``Tags`` filter list.

0 commit comments

Comments
 (0)