Project

General

Profile

Actions

Bug #1606

open

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

Added by Dean Brown about 2 months ago. Updated about 1 month 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 about 2 months ago

  • File 1606_gtk4.patch added
Actions #2

Updated by Marko Lindqvist about 1 month 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 about 1 month ago

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

Updated by Dean Brown about 1 month 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

Also available in: Atom PDF