f08a268e8a
* WIP: add scroll icons to Label widget It's an opt-out. The icons are rendered in the right-most column of the 1st and last row. They are only rendered when text can actually be scrolled in the corresponding direction. WIP: Currently, the icons might overlay text characters, there is no mechanism preventing it * gui.lua: expose the `parse_inset()` function * refactor Label's scroll icon code * since `render_scroll_icons` only works with a label, it's now a class function * `update_scroll_inset` ensures `frame_inset.r` or `.l` is at least 1, according to `show_scroll_icons` * `show_scroll_icons` has 4 possible values: `false` for no icons, `left` for icons on the first column on the left (also ensuring `frame_inset.l >= 1`), `right` - last column on the right, `DEFAULT_NIL` - same as `right` if text height greater than `frame_body.height`, else same as `false`. * make `render_scroll_icons` always draw icons The check now happens in `onRenderFrame` * draw frame's background calling `Label.super.onRenderFrame(self, dc, rect)` makes frame's background invisible for some reason * remove trailing spaces * fix scroll icons placed far above/below text With `Label.frame_inset = 1` the text could be vertically centered with plenty of space below and above, but not all rendered. Before this change, the scroll icons would be at the very top and bottom of the frame instead of near the first and last rendered text line. * always `update_scroll_inset` to react to resized window * draw scroll icons next to text * update `Lua API.rst` with new `Label` parameters * move comment separator up This way every scroll related parameter is in one group * list default values for new parameters in docs * add missing description of `Label.scroll_keys` |
||
---|---|---|
.github | ||
CMake | ||
build | ||
ci | ||
data | ||
depends | ||
dfhack-config | ||
docs | ||
library | ||
package | ||
plugins | ||
scripts@d9e390cd55 | ||
test | ||
travis | ||
.gitignore | ||
.gitmodules | ||
.pre-commit-config.yaml | ||
.ycm_extra_conf.py | ||
CMakeLists.txt | ||
CMakeSettings.json | ||
LICENSE.rst | ||
README.html | ||
README.md | ||
conf.py | ||
dfhack.init-example | ||
index.rst | ||
onLoad.init-example |
README.md
DFHack Readme
DFHack is a Dwarf Fortress memory access library, distributed with scripts and plugins implementing a wide variety of useful functions and tools.
The full documentation is available online here,
from the README.html page in the DFHack distribution, or as raw text in the ./docs
folder.
If you're an end-user, modder, or interested in contributing to DFHack -
go read those docs.
If that's unclear, or you need more help checkout our support page for up-to-date options.