Opened 6 years ago

Closed 3 years ago

Last modified 3 years ago

#2163 closed enhancement (fixed)

[PATCH] Content sensitive group icon

Reported by: Josef Kufner Owned by: elexis
Priority: Nice to Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: Patch:


Group buttons at the left edge of the screen have universal icon which only shows number of the group. It woud be more useful to use icon of majority unit in the group. Like a little preview. The number should be visible in the corner of the button.

If there is same amount of units (five elephants and five villagers), the more expensive one should be used first (the elephant icon).

Change History (7)

comment:1 Changed 6 years ago by Josef Kufner

Summary: Group iconContent sensitive group icon

comment:2 Changed 6 years ago by michael

Agreed. This would be a nice feature. And the icons don't have to be super specific. There can be a horse/cavalry icon, an infantry icon, a "support" icon, a generic ship icon, etc.

comment:3 Changed 6 years ago by Josef Kufner

Adding less specific icons is more work than using icon of major unit in group. And it will make buttons less specific...

comment:4 Changed 3 years ago by Imarok

Keywords: patch rfc added
Milestone: BacklogAlpha 21
Summary: Content sensitive group icon[PATCH] Content sensitive group icon

comment:5 Changed 3 years ago by elexis

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 18728:

Show the portrait of the most common (or most costly) unit type in the selection group buttons on the left hand side. Patch by Imarok, fixes #2163.

comment:6 Changed 3 years ago by elexis

Component: Core engineUI & Simulation
Keywords: rfc removed
Type: defectenhancement

Thanks for the patch as usual :)

I made those 2 functions local, since they were not used anywhere else and added a comment. Also made it a template argument of the cost function, so it would be hopefully less confusing (since the group argument you had in there before represents only a subset of the group)

comment:7 Changed 3 years ago by elexis

Has some rare, not yet reproducible bug: #4269

Note: See TracTickets for help on using tickets.