Cockatrice/cockatrice/src/game_graphics/board
Bryce! 3d8c729517
[Client] Preview token edits live and preserve custom drafts (#7737)
* Preview token edits live and preserve custom drafts

* Restore the upstream reveal-random-hand-cards action

The rebase onto upstream/master took the PR side of player_actions.cpp and
dropped PlayerActions::actRevealRandomHandCards, which upstream added after
the PR merge base. Re-apply the face-down P/T fix on the current file so the
branch keeps both changes.

* Draw the token preview P/T as the hover-panel pill

The preview painted the name and P/T unconditionally: the name duplicated the
artwork, and the raw P/T text was drawn even when it matched the printed value,
which looked wrong at non-default dialog sizes.

- Suppress the card name over a token picture via a small AbstractCardItem hook;
  cards without art still show it.
- Draw only a P/T that differs from the printed getPowTough() as the #7700
  hover-panel pill: dark rounded scrim, bold white text, anchored on the printed
  P/T box and clamped inside the card.
- Use designated CardRef initializers in the new code.

The face-up draft still previews while face-down creation is selected.

---------

Co-authored-by: Lukas Brübach <44814898+BruebachL@users.noreply.github.com>
2026-11-09 12:59:53 +01:00
..
abstract_card_drag_item.cpp [Client] Guard dragged card ghost from painting or dropping deleted cards (#7688) 2026-11-02 08:39:07 +01:00
abstract_card_drag_item.h [Client] Guard dragged card ghost from painting or dropping deleted cards (#7688) 2026-11-02 08:39:07 +01:00
abstract_card_item.cpp [Client] Preview token edits live and preserve custom drafts (#7737) 2026-11-09 12:59:53 +01:00
abstract_card_item.h [Client] Preview token edits live and preserve custom drafts (#7737) 2026-11-09 12:59:53 +01:00
abstract_counter.cpp [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
abstract_counter.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
abstract_graphics_item.cpp [Fonts] Migrate CardText surfaces to theme font role (#7538) 2026-11-04 07:57:54 +01:00
abstract_graphics_item.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
arrow_item.cpp Fix orphaned arrows when the draw shortcut repeats (#6789) 2026-11-07 16:53:53 +01:00
arrow_item.h Fix orphaned arrows when the draw shortcut repeats (#6789) 2026-11-07 16:53:53 +01:00
arrow_registry.cpp [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
arrow_registry.h [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
arrow_target.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
arrow_target.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
card_drag_item.cpp [Client] Guard dragged card ghost from painting or dropping deleted cards (#7688) 2026-11-02 08:39:07 +01:00
card_drag_item.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
card_item.cpp [Game] Refactor: rename hovered to restore previous semantics (#7816) 2026-11-09 12:54:10 +01:00
card_item.h Fix orphaned arrows when the draw shortcut repeats (#6789) 2026-11-07 16:53:53 +01:00
counter_general.cpp [Fonts] Migrate CardText surfaces to theme font role (#7538) 2026-11-04 07:57:54 +01:00
counter_general.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
graphics_item_type.h [Game] Give a graphics_item_type.h to arrow_item.h (#7150) 2026-08-21 19:22:44 +02:00
translate_counter_name.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
translate_counter_name.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00