Commit Graph

5368 Commits

Author SHA1 Message Date
Basile Clement
33946e61bb feat: Configurable colors for card counter (#5882)
* 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

* Do not use %n

* Use SettingsManager

* Use qSin instead of sin

Fix build failures with old GCC.

* Use letters for card counter names

* Place card counter actions in separate menu

* Remove copy-paste error

* include QtMath

* Do not color whole settings page

* derp

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-06-12-Development-2.11.0-beta.9
2025-06-12 22:12:46 -04:00
SlightlyCircuitous
0b34d20716 Add "landscapeOrientation" as a valid element (#5966) 2025-06-12 21:53:07 -04:00
RickyRister
8d0b36d2d4 [VDS] add deck search query options for name, filename, and path (#5975)
* implement search expressions

* update syntax help
2025-06-12 21:16:35 -04:00
RickyRister
7e08f7df67 [VDS] Remove searchFolderName setting (#5970)
* [VDS] Remove searchFolderName setting

* rename property in ExtraDeckSearchInfo
2025-06-12 20:45:01 -04:00
BruebachL
a688a5fe72 [VDD] Filter performance (#5974)
* Sort saved filters by name.

* Optimize performance, allow loading name filters from clipboard.

* Fix include.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-12 19:47:03 -04:00
BruebachL
fe57efb1a8 Parallel picture loader (#5977)
* Parallelize picture loader.

* Queue requests instead.

* Include a status bar for the picture loader.

* Save redirect cache on destruction.

* Address comments.

* Let's not overwrite an ambigious variable name.

* Lint.

* Oracle needs the status bar too.

* We actually get a free request if we hit a cached image.

* Fix cmake list.

* toString() the url.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-12 19:44:38 -04:00
BruebachL
9af3fbc35f Propagate display type from visual deck editor to card group display widget correctly on initialization. (#5978)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-12 19:37:57 -04:00
RickyRister
7495d2dc65 [VDS] Use display name for generic search expression (#5976) 2025-06-12 19:32:24 -04:00
RickyRister
456da93465 Support regex in card search (#5971) 2025-06-12 19:30:43 -04:00
justross
e7a6126fbd Web client: Updated packages with vulnerabilities using npm audit fix (#5955) 2025-06-08 22:29:57 -04:00
tooomm
aa41eb5da4 Add build attestations for releases (#5967) 2025-06-08 22:29:49 -04:00
RickyRister
87767be4a6 Put mutex around returning cards on concede (#5964) 2025-06-08 22:28:59 -04:00
tooomm
1e0a356cd2 fix transifex link (#5969) 2025-06-09 02:05:24 +02:00
tooomm
1b40c9e692 CI: Some cleanup (#5959)
* Update desktop-build.yml

* Update desktop-build.yml

* use CMAKE_GENERATOR in docker.sh

* revert to mtime
2025-06-06 18:42:55 -04:00
tooomm
2cc7565841 Only sign & notarize on master or tags (#5958) 2025-06-06 18:41:31 -04:00
Bruno Alexandre Rosa
cee67f4301 ci: use ccache on macos (#5952) 2025-05-24 15:24:15 +02:00
Bruno Alexandre Rosa
452bf61ef9 FIX: re-add CMAKE_GENERATOR_PLATFORM: 'x64' (#5954) 2025-05-22-Development-2.11.0-beta.8 2025-05-22 19:01:53 -04:00
RickyRister
50d3dfb98b Load deck from clipboard in Game Lobby (#5950) 2025-05-20-Development-2.11.0-beta.7 2025-05-20 10:36:17 -04:00
RickyRister
d729df5cba Add missing shortcuts for Game Lobby buttons (#5951) 2025-05-19 08:09:03 -04:00
RickyRister
a5638ccc3b Parent the "new sets found" dialog (#5948) 2025-05-18 22:06:32 -04:00
RickyRister
46643065ef Refactor banner card ComboBox (#5947) 2025-05-18 22:06:18 -04:00
RickyRister
b270562a44 Fix wrong Message Dock widget order from #5942 (#5946)
* fix

* refactor
2025-05-18 22:05:27 -04:00
BruebachL
cfbe59868b [VDS] Add prompt before overwriting existing files when converting to .cod (#5926)
* Add prompt before overwriting existing files.

* Lint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-17 22:25:13 -04:00
tooomm
207211facc CI: Tweak ccache for Linux builds (#5938)
* rework ccache

* use branch name
2025-05-17 22:25:01 -04:00
Bruno Alexandre Rosa
269523a034 ci: use Ninja on Linux and macOS builds (#5939)
* ci: use Ninja on linux and macos

* ci: simplify parallelism
2025-05-17 22:24:14 -04:00
RickyRister
1eee314d17 [VDS] Add ability to search by deck contents (#5943)
* [VDS] Add ability to search by deck contents

* add deck search syntax help

* fix build failure
2025-05-17 22:23:54 -04:00
RickyRister
8cc64bf44e Refactor TabGame: inline some QLayout and QWidget class fields (#5942)
* inline layouts

* inline widgets
2025-05-17 22:23:30 -04:00
RickyRister
5dd027ad63 [VDS] Deselect tag if clicked while already selected (#5944) 2025-05-16 14:39:33 -04:00
RickyRister
d51620640b [VDS] Add setting to show deck filepath in tooltip (#5899)
* [VDS] Show deck filepath in tooltip

* Make tooltip type into a setting

* Fix build failure
2025-05-12 17:39:58 -04:00
BruebachL
17c767fa42 [GDE] Add a group criteria to the deck list model (#5931)
* Add a group criteria to the deck list model and a combo box to the deck dock widget to change it.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-12 17:36:55 -04:00
tooomm
b2749a0c4e Add debug log (#5937) 2025-05-11 17:40:04 -04:00
tooomm
3b0c7a3a30 Re-add vcpkg binary caching (#5933) 2025-05-11 17:39:45 -04:00
tooomm
797681883b CI: Remove Ubuntu 20.04 (EOL May 31st) (#5849)
* ubuntu 20.04 eol

* Update release_template.md

* [skip ci] Delete .ci/Ubuntu20.04 directory
2025-05-11 17:38:13 -04:00
ebbit1q
48b6e1590c increase cache size for ccache on linux ci (#5935) 2025-05-11 11:48:58 +02:00
RickyRister
b423edf2b5 Fix segfault when multiple cards are dragged from view zone (#5934) 2025-05-11 01:44:32 +02:00
BruebachL
9cf979d154 [GDE/VDE] More granular modification signals. (#5927)
* More granular modification signals.

* Bruh.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-08 21:32:00 -04:00
RickyRister
033c8b269d [VDS] Refactor: move quick settings to separate class (#5905) 2025-05-06 23:00:11 -04:00
RickyRister
c4e42b94f9 Refactor CardSizeWidget: don't update setting directly (#5903) 2025-05-06-Development-2.11.0-beta.6 2025-05-06 21:31:01 -04:00
tooomm
5b9cb4fc8d Small changes related to docker image build+upload (#5907)
* ci label

* naming

* downloads

* run

* fix toc
2025-05-06 21:29:09 -04:00
BruebachL
99d9ce10c3 [GDE, VDS & VDE] Tooltips and labels (#5916)
* Add correct inversion for isHidden() on bannerCardLabel.

* Add tooltips to VDS buttons.

* Add tooltip to GDE button.

* Add tooltips to visual deck editor buttons.

* Add tooltips to visual database display buttons.

* Lint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-06 21:28:50 -04:00
BruebachL
34400c7f60 [VDE] Sample Hand Improvements (#5917)
* Actually call retranslateUi, add spinBox to change sample hand size, add card size slider.

* Lint.

* Fix include.

* Fix include again.

* Fix overloads.

* Update visual_deck_editor_sample_hand_widget.cpp

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-05-06 21:28:03 -04:00
transifex-integration[bot]
05914e38f0 Translate oracle/oracle_en@source.ts in pt_BR (#5918)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'pt_BR'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-05-06 21:26:27 -04:00
BruebachL
bddb54ef4c [VDE] Deck analytics visibility (#5919)
* Add scrollArea, I guess.

* Set mana curve bar color to grey for visibility.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-06 21:24:24 -04:00
BruebachL
46e146b34a [VDS] Allow tags to toggle to a NOT state to hide non-matching decks (#5920)
* Allow excluding tags.

* Lint.

* My linter is broken, don't ask.

* Zzz.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-06 21:23:49 -04:00
BruebachL
f16ba6861b Forward scroll event to scrollable parents if possible in NoScrollFilter. (#5921)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-06 21:22:37 -04:00
BruebachL
fb6af544e2 Set Banner Card again when restoring index on deckList data changes. (#5922)
* Set Banner Card again when restoring index on deckList data changes.

* Lint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-06 21:20:38 -04:00
Bruno Alexandre Rosa
4c3cfc8c2d fix: fix qt5 builds on macos 15 (#5923)
Although this config is not built on CI, while trying to compile locally, the build failed due to warnings and -Werror.
Some qt functions were actually deprecated (but not removed) before version 6.0.0 and clang (righfully) complains about comparison between different types of enums.
2025-05-06 21:18:59 -04:00
Basile Clement
286a7494d3 client: Support arbitrary game zones (#5877)
* Remove `isView` flag from CardZone

This flag is used for two purposes:

 1. It is used as a check for casting to a zone to a `ZoneViewZone`;

 2. Non-view zones are added to the player's zones on construction

This patch removes the `isView` flag and instead:

 1. We directly cast zones to `ZoneViewZone` using a dynamic (qobject)
    cast and use the result of the cast instead of the `isView` flag to
    detect if we are a view zone or not;

 2. The player records its own zones when they are created, simplifying
    control flow.

* Review

* client: Support arbitrary game zones

Currently, the client ignores cards in unknown zones, as there is an
implicit assumption that the set of zones known by the server and the
client are the same.

This patch makes it so that the client accept "custom zones" from the
server (zones outside the builtin deck, graveyard, exile, sideboard,
table, stack and hand zones) using the information from the
ServerInfo_CardZone. Moving cards from/into these zones happens
through a "View custom zone" action in the Game > Player menu and
properly appears in the chat.

Note that this patch intentionally does not introduce any support for
having the server actually create such zones. Instead, this patch aims
to improve backwards compatibility for when we do get to adding this
capability in the future, by making sure that current clients will be
able to interact with future new zones (even if suboptimally).
2025-05-06 21:18:08 -04:00
RickyRister
a07c1badd8 Add "copy to clipboard" button to Debug Log window (#5913) 2025-05-05-Development-2.11.0-beta.5 2025-05-05 11:45:22 -04:00
RickyRister
29d93fb9c1 Delete CardDragItem when referenced CardItem is destroyed (#5911) 2025-05-05 09:50:34 -04:00