2022-09-16 15:01:29 -06:00
|
|
|
overlay
|
|
|
|
=======
|
|
|
|
|
|
|
|
.. dfhack-tool::
|
2022-11-09 15:08:38 -07:00
|
|
|
:summary: Manage on-screen overlay widgets.
|
2022-09-16 15:01:29 -06:00
|
|
|
:tags: dfhack interface
|
|
|
|
|
2022-11-09 15:08:38 -07:00
|
|
|
The overlay framework manages the on-screen widgets that other tools (including
|
2022-11-28 17:08:11 -07:00
|
|
|
3rd party plugins and scripts) can register for display. For a graphical
|
2023-03-06 01:00:25 -07:00
|
|
|
configuration interface, please see `gui/control-panel`. If you are a developer
|
|
|
|
who wants to write an overlay widget, please see the `overlay-dev-guide`.
|
2022-09-16 15:01:29 -06:00
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
2022-11-09 15:08:38 -07:00
|
|
|
``enable overlay``
|
|
|
|
Display enabled widgets.
|
|
|
|
``overlay enable|disable all|<name or list number> [<name or list number> ...]``
|
|
|
|
Enable/disable all or specified widgets. Widgets can be specified by either
|
|
|
|
their name or their number, as returned by ``overlay list``.
|
2022-11-11 11:36:58 -07:00
|
|
|
``overlay list [<filter>]``
|
2022-11-09 15:08:38 -07:00
|
|
|
Show a list of all the widgets that are registered with the overlay
|
2022-11-11 11:36:58 -07:00
|
|
|
framework, optionally filtered by the given filter string.
|
2022-11-09 15:08:38 -07:00
|
|
|
``overlay position <name or list number> [default|<x> <y>]``
|
|
|
|
Display configuration information for the given widget or change the
|
|
|
|
position where it is rendered. See the `Widget position`_ section below for
|
|
|
|
details.
|
|
|
|
``overlay trigger <name or list number>``
|
|
|
|
Intended to be used by keybindings for manually triggering a widget. For
|
|
|
|
example, you could use an ``overlay trigger`` keybinding to show a menu that
|
|
|
|
normally appears when you hover the mouse over a screen hotspot.
|
|
|
|
|
|
|
|
Examples
|
|
|
|
--------
|
|
|
|
|
|
|
|
``overlay enable all``
|
|
|
|
Enable all widgets. Note that they will only be displayed on the screens
|
|
|
|
that they are associated with. You can see which screens a widget will be
|
|
|
|
displayed on, along with whether the widget is a hotspot, by calling
|
|
|
|
``overlay position``.
|
|
|
|
``overlay position hotkeys.menu``
|
|
|
|
Show the current configuration of the `hotkeys` menu widget.
|
|
|
|
``overlay position dwarfmonitor.cursor -2 -3``
|
|
|
|
Display the `dwarfmonitor` cursor position reporting widget in the lower
|
|
|
|
right corner of the screen, 2 tiles from the left and 3 tiles from the
|
|
|
|
bottom.
|
|
|
|
``overlay position dwarfmonitor.cursor default``
|
|
|
|
Reset the `dwarfmonitor` cursor position to its default.
|
|
|
|
``overlay trigger hotkeys.menu``
|
|
|
|
Trigger the `hotkeys` menu widget so that it shows its popup menu. This is
|
|
|
|
what is run when you hit :kbd:`Ctrl`:kbd:`Shift`:kbd:`C`.
|
|
|
|
|
|
|
|
Widget position
|
|
|
|
---------------
|
|
|
|
|
|
|
|
Widgets can be positioned at any (``x``, ``y``) position on the screen, and can
|
|
|
|
be specified relative to any edge. Coordinates are 1-based, which means that
|
|
|
|
``1`` is the far left column (for ``x``) or the top row (for ``y``). Negative
|
|
|
|
numbers are measured from the right of the screen to the right edge of the
|
|
|
|
widget or from the bottom of the screen to the bottom of the widget,
|
|
|
|
respectively.
|
|
|
|
|
|
|
|
For easy reference, the corners can be found at the following coordinates:
|
2022-09-16 15:01:29 -06:00
|
|
|
|
2022-11-09 15:08:38 -07:00
|
|
|
:(1, 1): top left corner
|
|
|
|
:(-1, 1): top right corner
|
|
|
|
:(1, -1): lower left corner
|
|
|
|
:(-1, -1): lower right corner
|