search widget support for DF siege engines subtab #5665
+120
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses: #5644
This repositions the search widget and makes it functional on the "Siege engines" subtab.
Open questions:
Bumping the
versionin PlacesOverlay is the only way I know to cause the newdefault_posto be automatically applied. Unfortunately it will also reset the enabled-state of the overlay (possibly causing thoughts like "Why does DFHack keep turning this stuff back on?!" for players that previously disabled the overlay).Should we forego the horizontal repositioning (leaving the search widget text field "squashed" in narrow interfaces) to avoid the associated unconditional re-enabling?
Should
siege_engine_typebe replaced with an enum-attr onsiege_engine_type?Myk has previously mentioned this mechanism to me. I'm not sure if this particular mapping would more generally useful in the future though.
I was initially also adding "search keys" for the siege engine action (
siegeengine_action). DF shows text descriptions for these values when viewing the building's individual info panel, but they are not shown in the Siege engines subtab (only the graphical buttons are shown—without even any hover explanations).While it seems like it might be useful to search by "action", I ultimately found it too surprising. E.g. I had a catapult named "C center" and searched for "ce", but another siege engine that was set to "Practice Fire" also turned up.
The "loaded status" and "operator status" are displayed by DF in the Siege engines subtab, so I made them searchable, but maybe only the name/type should really be searchable?