Skip to content

Commit

Permalink
Update global widgets options maniputation instructions in README
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktor-obrebski committed Oct 8, 2024
1 parent 52ed516 commit b75eb0f
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions docs/dev/Lua API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5348,15 +5348,9 @@ If the panel has already been maximized in this fashion, then it will jump to
its minimum size. Both jumps respect the resizable edges defined by the
``resize_anchors`` attribute.

The time duration that a double click can span can be controlled by widgets API:

* ``widgets.getDoubleClickMs()``
* ``widgets.setDoubleClickMs(value)``

The default value is ``500`` and can be changed by the end
user with a command like::

:lua require('gui.widgets').setDoubleClickMs(1000)
The time duration that a double click can span default value is ``500``.
It can be controlled via the `control-panel` or `gui/control-panel` interfaces
(``Mouse double click speed`` option).

Window class
------------

Check failure on line 5356 in docs/dev/Lua API.rst

View workflow job for this annotation

GitHub Actions / lint / lint

Contains trailing whitespace: line 5356
Expand Down Expand Up @@ -5558,21 +5552,14 @@ while scrolling will result in faster movement.
You can click and drag the scrollbar to scroll to a specific spot, or you can
click and hold on the end arrows or in the unfilled portion of the scrollbar to
scroll multiple times, just like in a normal browser scrollbar. The speed of
scroll events when the mouse button is held down can be controlled by two global
getter/setter pairs:

1. The delay before the second scroll event.
* ``widgets.getScrollInitialDelayMs()``
* ``widgets.setScrollInitialDelayMs(value)``

2. The delay between further scroll events.
* ``widgets.getScrollDelayMs()``
* ``widgets.setScrollDelayMs(value)``
scroll events when the mouse button is held down can be controlled
via the `control-panel` or `gui/control-panel` interfaces:

The defaults are 300 and 20, respectively, but they can be overridden by the
user in their :file:`dfhack-config/init/dfhack.init` file, for example::
1. The delay before the second scroll event use
``Mouse initial scroll repeat delay`` option (default is 300)

:lua require('gui.widgets').setScrollDelayMs(100)
2. The delay between further scroll events use
``Mouse scroll repeat delay`` option (default is 20)

Label class
-----------
Expand Down

0 comments on commit b75eb0f

Please sign in to comment.