sort: clickable stress icons in the top bar - #5953
Conversation
4dc9c37 to
bc039a3
Compare
|
Windows test-leg failures are the known DF startup crash ( |
91028c6 to
cf3d323
Compare
Adds an invisible hotspot overlay over the seven stress/happiness icons next to the Pop label. Clicking an icon opens a filterable list of the citizens in that stress category, and selecting one centers the map on them.
cf3d323 to
7d9af7f
Compare
|
Correction to the above: the Windows failures were not the startup crash — the tests ran (310/314) and errored on |
The dialog choice held a unit reference captured when the list opened; if the citizen died or left the map while the list was up, dereferencing it was unsafe. Store the unit id and look it up again on select.
Summary
sort.stress_icons) over the seven stress/happiness icons next to the "Pop" label in the fortress-mode top bar.ListBoxof the citizens in that stress category (e.g. "Citizens: Unhappy").dfhack.gui.revealInDwarfmodeMap.Poplabel, so the hotspot tracks window resizes and fort-name length changes. Only active ondwarfmode/Default.test/plugins/sort.lua) covering rect detection, click handling, list filtering, and map centering.Test plan
test -t plugins.sortin-game on a fortress save: 5/5 tests, 38/38 checks pass