mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-15 23:12:14 -07:00
feat: Configurable colors for card counter
This patch adds support for: - User-defined colors for card counters; - 3 additional types of card counters. The colors used for counters is stored locally and not shared with other users. This is intentional as the feature is likely to be used for improved accessibility. In order to preserve backwards-compatibility, and because I don't have a better idea, counters keep their existing color-based names (Red, Green, Yellow) in menus and in the message log. For consistency, the new counters also get assigned color-based names (Cyan, Purple, Magenta). This choice is a compromise, as allowing user-defined names for counters raises many additional (UI/UX) questions that I don't know how to answer. A good long-term solution would be to include counter names as part of a game definition system and hence would be in scope for #1740. The choice of adding 3 additional types of counters and the Cyan, Purple and Magenta names are not random. The existing code for determining counter colors goes: Red, Green, Yellow, Cyan, Purple, Magenta, Black (unreadable) and thus 6 is the maximum number of counters that existing versions of Cockatrice are able to support. This way, released clients get a degraded experience (cannot interact with the new counters, messages in the server log say "Player X places 1 on Card (now 1)" without specifying 1 of what), but do see the counters properly. Fixes #2020
This commit is contained in:
parent
77d13090b5
commit
cb423dbfbc
12 changed files with 241 additions and 36 deletions
|
|
@ -28,6 +28,7 @@ set(oracle_SOURCES
|
|||
../cockatrice/src/game/cards/card_database_parser/cockatrice_xml_4.cpp
|
||||
../cockatrice/src/settings/cache_settings.cpp
|
||||
../cockatrice/src/settings/shortcuts_settings.cpp
|
||||
../cockatrice/src/settings/card_counter_settings.cpp
|
||||
../cockatrice/src/settings/card_database_settings.cpp
|
||||
../cockatrice/src/settings/servers_settings.cpp
|
||||
../cockatrice/src/settings/settings_manager.cpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue