When first opening the picker window, we attempt to find a valid class and type to select. If the picker window was closed with filters enabled, there may not be anything list that is usable.
Resolve this by using callbacks to find the first usable type when no types are listed.
english (au): 16 changes by krysclarke
chinese (simplified): 16 changes by XiaoJi-Game
korean: 19 changes by telk5093
russian: 1 change by Ln-Wolf
finnish: 16 changes by hpiirai
lithuanian: 1 change by khamper
portuguese: 17 changes by azulcosta
portuguese (brazilian): 16 changes by pasantoro
This allows ctrl-click on a type in a build-picker window to remember it
as a favourite. An new filter button to show only favourites makes it
simpler to use these types.
Favourite types are saved locally in favs.cfg, so are remembered between
games.
This filters the build-picker type lists to only show types that have
already been placed in the current game, making it simpler to get to
build matching features.
Toggling the "All" filter causes the class selection to be ignored, so
that items from all classes can be displayed together. The class text
filter is still applied.
This makes it easier to search amongst types for a feature.
These windows now share a common code base for choosing and display class and types.
An additional text filter is added to search types by name instead of just classes.
Standardises how the class index is stored in the spec, instead of relying ot the Spec structs having the same members.
This allows retrieving class_index and index without searching or using pointer arithmetic.
'cls_id' is renamed to 'class_index' to make it clearer that it is an index rather than the multichar label of the class.
There is a nice feature that synchronises the client settings upon setting up the company. Before
this, those commands would not be executed when no-actions-while-paused is set. This means that,
silently and depending on the server configuration, your wished for configuration might not be
there.
Similarly there is the president's face that's being set while creating a new company and setting
of the president/company name upon creation, when no-actions-while-paused is set.
So, just allow these operations also while paused to get a uniform experience when joining. To
keep the UI somewhat consistent, apply this "freedom" also to the other bits set from the company
UI; specifically company name and company colour.
english (au): 1 change by krysclarke
estonian: 25 changes by siimsoni
korean: 3 changes by telk5093
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
catalan: 5 changes by J0anJosep
latvian: 30 changes by lexuslatvia
lithuanian: 140 changes by khamper
portuguese: 1 change by azulcosta
portuguese (brazilian): 3 changes by pasantoro