Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Template for new versions:
- `gui/sitemap`: shift click to start following the selected unit or artifact
- `prioritize`: when prioritizing jobs of a specified type, also output how many of those jobs were already prioritized before you ran the command
- `prioritize`: don't include already-prioritized jobs in the output of ``prioritize -j``
- `gui/design`: only display vanilla dimensions tooltip if the DFHack dimensions tooltip is disabled

## Removed

Expand Down
22 changes: 14 additions & 8 deletions docs/gui/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ gui/design
:tags: fort design productivity interface map

This tool provides a point and click interface to make designating shapes
and patterns easier. Supports both digging designations and placing constructions.
and patterns easier. Supports both digging designations and placing
constructions.

Usage
-----
Expand All @@ -19,18 +20,23 @@ Usage
Overlay
-------

This tool also provides two overlays that are managed by the `overlay` framework.
This tool also provides two overlays that are managed by the `overlay`
framework.

dimensions
~~~~~~~~~~

The ``gui/design.dimensions`` overlay shows the selected dimensions when designating
with vanilla tools, for example when painting a burrow or designating digging.
The dimensions show up in a tooltip that follows the mouse cursor.
The ``gui/design.dimensions`` overlay shows the selected dimensions when
designating with vanilla tools, for example when painting a burrow or
designating digging. The dimensions show up in a tooltip that follows the mouse
cursor.

When this overlay is enabled, the vanilla dimensions display will be hidden.
When this overlay is disabled, the vanilla dimensions display will be unhidden.

rightclick
~~~~~~~~~~

The ``gui/design.rightclick`` overlay prevents the right mouse button and other keys
bound to "Leave screen" from exiting out of designation mode when drawing a box with
vanilla tools, instead making it cancel the designation first.
The ``gui/design.rightclick`` overlay prevents the right mouse button and other
keys bound to "Leave screen" from exiting out of designation mode when drawing
a box with vanilla tools, instead making it cancel the designation first.
8 changes: 8 additions & 0 deletions gui/design.lua
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ function DimensionsOverlay:preUpdateLayout(parent_rect)
self.frame.h = parent_rect.height
end

function DimensionsOverlay:overlay_onenable()
df.global.d_init.display.flags.SHOW_RECTANGLE_DIMENSIONS = false
end

function DimensionsOverlay:overlay_ondisable()
df.global.d_init.display.flags.SHOW_RECTANGLE_DIMENSIONS = true
end

---
--- RightClickOverlay
---
Expand Down
Loading