Cockatrice/libcockatrice_game/libcockatrice/game/player
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
..
card_menu_action_type.h [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
card_move_request.h [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
event_processing_options.h [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
move_top_cards_until_options.h [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
player_actions.cpp [Client] Preview token edits live and preserve custom drafts (#7737) 2026-11-09 12:59:53 +01:00
player_actions.h [Game] Reveal multiple distinct random hand cards to a recipient (#7753) 2026-11-08 16:41:14 +01:00
player_event_handler.cpp [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
player_event_handler.h [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
player_info.cpp [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
player_info.h [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
player_logic.cpp [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
player_logic.h [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
player_manager.cpp [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
player_manager.h [Server/Client/Protocol] Shuffle or reorder player seats before a game starts (#7398) 2026-11-04 15:44:50 +01:00
token_info.h [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00