add links to quickstart-guide and gui/control-panel to the title screen

develop
Myk Taylor 2023-05-16 12:05:53 -07:00
parent 5c7d9f228d
commit 6aede45135
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
3 changed files with 24 additions and 1 deletions

@ -55,6 +55,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- `gui/design`: Improved performance for drawing shapes
- Dreamfort: improve traffic patterns throughout the fortress (stockpiles and zones are still not working, pending updates in `quickfort`)
- Core: For debugging purposes, you can now pass ``--disable-dfhack`` on the Dwarf Fortress commandline or specify ``DFHACK_DISABLE=1`` in the environment to disable DFHack for the current session.
- `overlay`: added links to the quickstart guide and the control panel on the DF title screen
## Documentation

@ -66,3 +66,10 @@ For easy reference, the corners can be found at the following coordinates:
:(-1, 1): top right corner
:(1, -1): lower left corner
:(-1, -1): lower right corner
Overlay
-------
The `overlay` plugin also provides a standard overlay itself:
``title_version``, which displays the DFHack version on the DF title screen,
along with quick links to `quickstart-guide` and `gui/control-panel`.

@ -580,7 +580,8 @@ TitleVersionOverlay.ATTRS{
default_pos={x=7, y=2},
default_enabled=true,
viewscreens='title/Default',
frame={w=35, h=3},
frame={w=35, h=5},
autoarrange_subviews=1,
}
function TitleVersionOverlay:init()
@ -602,6 +603,20 @@ function TitleVersionOverlay:init()
text=text,
text_pen=COLOR_WHITE,
},
widgets.HotkeyLabel{
frame={l=0},
label='Quickstart guide',
auto_width=true,
key='STRING_A063',
on_activate=function() dfhack.run_script('quickstart-guide') end,
},
widgets.HotkeyLabel{
frame={l=0},
label='Control panel',
auto_width=true,
key='STRING_A047',
on_activate=function() dfhack.run_script('gui/control-panel') end,
},
}
end