Bug #1606
openGtk4 client help -> units should show >1 tech requirement
0%
Description
Spun off from #1604.
New in 3.2, units now have general requirement vectors and a unit can require >1 techs. Clients should show that info.
Files
Updated by Marko Lindqvist 5 months ago
Having multiple techs (or anything else than a single tech name) in the same button breaks it. It leads to no legal help location.
You would need to dynamically create a separate button for each tech req.
Updated by Dean Brown 5 months ago
- File 1606_gtk4.patch 1606_gtk4.patch added
Yes, more work was needed.
The grid help_utable is usually 5 rows and 5 cols - (zero based) row 4 col 2 was not used. That now gets the 2nd requirement (if needed). Any more requirements start a new row (row 5) and cols 0-2, then row 6 and cols 0-2, etc. The next time thru help_update_unit_type(), the added rows get removed and row 4 col 2 gets hidden before iterating the reqs.
Not relevant to this fix, just curious, I wasn't able to figure out while digging thru the code - how do the labels and buttons get their font & color?
Updated by Marko Lindqvist 8 days ago
Dean Brown wrote in #note-4:
Not relevant to this fix, just curious, I wasn't able to figure out while digging thru the code - how do the labels and buttons get their font & color?
I guess data/themes/gtk4/Freeciv/gtk-4.0/gtk.css
Updated by Marko Lindqvist 8 days ago
These tickets have been stuck because I've meant to check if there's an easy way to provide more complete info, containing also other requirement types in addition to tech reqs.
I did some related work not so long ago resulting in struct help_page_selection that might be useful here.