Project

General

Profile

Actions

Bug #1606

open

Gtk4 client help -> units should show >1 tech requirement

Added by Dean Brown 5 months ago. Updated 8 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
gtk4-client
Target version:
-
Start date:
07/14/2025
Due date:
% Done:

0%

Estimated time:

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

1606_gtk4.patch (4.45 KB) 1606_gtk4.patch corrected Dean Brown, 07/20/2025 02:39 AM
Actions #1

Updated by Dean Brown 5 months ago

  • File 1606_gtk4.patch added
Actions #2

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.

Actions #3

Updated by Dean Brown 5 months ago

  • File deleted (1606_gtk4.patch)
Actions #4

Updated by Dean Brown 5 months ago

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?

Actions #5

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

Actions #6

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.

Actions

Also available in: Atom PDF