mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 19:43:55 -07:00
Refine command zone counters and unify counter clamp arithmetic
- Route value updates through the virtual setValue() so
CommanderTaxCounter's tooltip tracks the live value instead of
freezing at its initial value
- Reject deletion of reserved tax counters in cmdDelCounter; they are
server-managed and must persist for the game
- Register aMoveToCommandZone and aViewCommandZone as bindable
shortcuts, matching their sibling move/view zone actions
- Extract overflow-safe clamped addition into addClamped(), shared by
Server_Card and Server_Counter instead of duplicated
- Update stale comments: the clip-container note (now used by
CommandZone) and CommandZone's layout docs (defer to
SelectZone::layoutCardsVertically)
This commit is contained in:
parent
754b31cc29
commit
240ca7029f
8 changed files with 37 additions and 22 deletions
|
|
@ -36,11 +36,11 @@ constexpr qreal COMMAND_ZONE_WIDTH = CardDimensions::WIDTH_F * 1.5;
|
|||
* @class CommandZone
|
||||
* @brief Graphics layer for the command zone in Commander format games.
|
||||
*
|
||||
* Always visible when enabled. Supports multiple cards using a zigzag
|
||||
* horizontal stacking pattern: single cards display centered, multiple
|
||||
* cards alternate left-right with vertical overlap compression.
|
||||
* Can be minimized to 25% height via double-click.
|
||||
* Always visible when enabled. Cards are laid out by the shared
|
||||
* SelectZone::layoutCardsVertically. Can be minimized to 25% height via
|
||||
* double-click.
|
||||
*
|
||||
* @see SelectZone::layoutCardsVertically for the card layout
|
||||
* @see CommandZoneLogic for card data management
|
||||
* @see CommanderTaxCounter for the tax counter overlay
|
||||
*/
|
||||
|
|
@ -79,7 +79,7 @@ public:
|
|||
[[nodiscard]] QRectF boundingRect() const override;
|
||||
/** @brief Paints the zone background using the Commander theme brush. */
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
/** @brief Repositions cards using zigzag horizontal stacking with overlap compression. */
|
||||
/** @brief Repositions cards via the shared SelectZone vertical layout (allows bottom overflow). */
|
||||
void reorganizeCards() override;
|
||||
|
||||
/** @brief Toggles between full and 25% minimized height. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue