Commit graph

5839 commits

Author SHA1 Message Date
DawnFire42
1ae1d876b1 feat(command-zone): add context menu system
Implement CommandZoneMenu - context menu for interacting with cards
in the command zone.

Menu actions include:
- Cast commander (move to stack)
- Return to command zone
- View/reveal zone contents
- Commander-specific actions (tax reset, etc.)

Integration with existing menu system:
- CardMenuActionType: new action types for command zone
- CardMenu: command zone action routing
- MoveMenu: command zone as move destination
- PlayerMenu: command zone menu integration
- Zone menus: inherit from AbstractZoneMenu

This provides the right-click interaction layer for command zones.
2026-02-26 20:13:32 -05:00
DawnFire42
54e7ee1b42 feat(command-zone): add abstract zone menu base class
Introduce AbstractZoneMenu - a base class for zone-specific context
menus that provides common functionality.

This abstraction:
- Reduces code duplication across zone menu implementations
- Establishes consistent menu behavior patterns
- Provides foundation for CommandZoneMenu implementation

Small foundational commit to keep the menu hierarchy clean.
2026-02-26 20:13:32 -05:00
DawnFire42
6e83d64622 feat(command-zone): add graphics implementation with integration tests
Implement CommandZone - the main Qt graphics class for rendering and
interacting with command zones.

This commit brings together all previous components:
- Uses CommandZoneState for visibility management
- Uses CommandZoneLogic for card data handling
- Uses ZoneToggleButton for visibility controls
- Uses CommanderTaxCounter for tax display
- Uses z_values.h for proper visual layering

Zone modifications for command zone support:
- SelectZone: add command zone to zone selection
- StackZone: support command zone in stack operations
- TableZone: command zone positioning integration
- ViewZoneWidget: command zone viewing support

Integration tests verify:
- Counter parenting behavior
- Zone state coordination
- Full graphics stack interaction
2026-02-26 20:13:32 -05:00
DawnFire42
78db49a9b3 feat(command-zone): add zone toggle button component
Implement ZoneToggleButton - a reusable UI component for toggling
zone visibility states.

Features:
- Click to toggle between hidden/revealed states
- Visual feedback showing current state
- Hover effects for discoverability
- Proper event handling for mouse interactions

This self-contained graphics component will be used by CommandZone
to provide users with intuitive visibility controls.
2026-02-26 20:13:32 -05:00
DawnFire42
7a0a3ff9ac feat(command-zone): add commander tax counter system with tests
Implement CommanderTaxCounter - tracks casting cost increases for
commanders that have been cast multiple times.

Key components:
- CommanderTaxCounter: specialized counter with value clamping
- AbstractCounter modifications: support for counter ID system
- CounterGeneral/TranslateCounterName: UI integration for display

Design decisions:
- Counter values clamped to valid range (0 to max)
- Builds on counter_ids.h constants from commit 1
- Uses z_values.h from commit 4 for proper visual layering
- Counter visibility tied to zone state (hidden when zone hidden)

Test coverage:
- commander_tax_counter_test: verifies setValue clamping behavior
- counter_visibility_test: verifies visibility state transitions

Note: Tests include <climits> for INT_MIN usage (required on some compilers
like GCC on Debian 11 where INT_MIN is not transitively included).
2026-02-26 20:13:32 -05:00
DawnFire42
8422357878 feat(command-zone): add logic layer with tests
Implement CommandZoneLogic - the card data management layer for zones.
This layer handles card insertion, removal, and ordering independently
of Qt graphics rendering.

Key components:
- CommandZoneLogic: manages card data within a zone
- AddCardAlgorithm: generic insertion algorithm for ordered zones
- CardZoneLogic modifications: integrate with existing zone hierarchy

Design decisions:
- Separation of data logic from graphics enables unit testing
- addCardImpl uses a stable insertion algorithm for consistent ordering
- Mock card items enable testing without Qt graphics dependencies

Test coverage verifies card insertion behavior across edge cases.
2026-02-26 20:13:32 -05:00
DawnFire42
3c2e4a3fb2 feat(command-zone): add state machine with tests
Implement CommandZoneState - a pure C++ state machine managing zone
visibility transitions (Hidden, Revealed, Peeking states).

The state machine is intentionally decoupled from Qt graphics:
- Pure logic with no Qt dependencies in the state class
- Testable in isolation without a GUI
- Clear state transition table with StateChangeResult outcomes

Test coverage verifies:
- Initial state is Hidden
- Valid transitions: Hidden->Revealed, Hidden->Peeking, etc.
- Invalid transitions return NoChange
- Peek timeout triggers return to previous state

This establishes the foundation for command zone visibility management
while keeping graphics concerns separate.
2026-02-26 20:13:32 -05:00
DawnFire42
ba1a388e5d feat(command-zone): add Z-value constants for command zones
Extend z_values.h with command-zone specific constants:

ZValues namespace additions:
- TOGGLE_BUTTON (0.5): Button above zone background, below cards
- PARTNER_ZONE (1.0): Partner zone level within command zone
- COMMAND_ZONE (1.0): Standard zone level for command zones
- TAX_COUNTERS (overlay+2): Commander tax counter overlay layer

ZoneSizes namespace (new):
- COMMAND_ZONE_HEIGHT: Card height plus 8px padding
- MINIMUM_STACK_HEIGHT: 100px minimum for usability
- TAX_COUNTER_SIZE: 24px for tax counter icons
- COMMAND_ZONE_WIDTH: 100.0 pixels
- MINIMIZED_HEIGHT_RATIO: 25% when minimized

GameColors namespace (new):
- OVERLAY_ALPHA: 191 (75% opaque)
- OVERLAY_BG_NORMAL/HOVERED: Consistent overlay styling

These constants enable visual consistency across command zone components.
2026-02-26 20:13:32 -05:00
DawnFire42
3a92505c5e feat(command-zone): add foundational type definitions
Add core type definitions and constants for the command zone feature:

- zone_names.h: Add command zone name constants (command, partner,
  companion, background) for protocol and lookup operations
- command_zone_types.h: Define CommandZoneType enum, ZoneVisibility enum,
  and StateChangeResult struct for state machine logic
- counter_ids.h: Define shared counter IDs and names for commander tax
  tracking (IDs 8-9 reserved to avoid conflicts with user counters)

These headers are intentionally minimal and dependency-free to enable
inclusion in both production code and isolated unit tests.
2026-02-26 20:13:32 -05:00
DawnFire42
e2d5c7438d refactor(graphics): replace Z-value magic numbers with constants
Replace hardcoded Z-value numbers with ZValues::* constants:
- 2000000007 -> ZValues::DRAG_ITEM
- 2000000007 + offset -> ZValues::DRAG_ITEM_CHILD
- 2000000004 -> ZValues::HOVERED_CARD
- 2000000005 -> ZValues::ARROWS

This improves code readability by making the intent of these layer
values explicit and centralizes Z-ordering logic for easier maintenance.
2026-02-26 19:53:58 -05:00
DawnFire42
2fb881ca60 refactor(graphics): introduce Z-value constants and layer manager
Add centralized Z-value management for Qt's stacking order system. This
replaces scattered magic numbers with semantic constants, making the rendering
hierarchy explicit and maintainable.

The architecture defines three layers:
- Zone layer (0-999): Zone backgrounds and containers
- Card layer (1-40M): Cards on the table zone using position-based formula
- Overlay layer (200M+): UI elements that always render above cards

ZValueLayerManager provides validation utilities and the overlayZValue()
function for computing overlay Z-values. ZValues namespace provides the
semantic constants used throughout the codebase.

The 5x gap between card max (40M) and overlay base (200M) provides safety
margin for future table zone expansions.
2026-02-26 19:53:58 -05:00
DawnFire42
408fc2f14a refactor(zones): use ZoneNames constants instead of strings
Replace hardcoded zone name strings with ZoneNames::* constants
for existing zones. This improves maintainability and type safety.

Zones converted:
- "hand" -> ZoneNames::HAND
- "deck" -> ZoneNames::DECK
- "grave" -> ZoneNames::GRAVE
- "rfg" -> ZoneNames::EXILE
- "sb" -> ZoneNames::SIDEBOARD
2026-02-26 19:53:58 -05:00
DawnFire42
fe162025f1 refactor(zones): introduce ZoneNames constants header
Add a centralized header for zone name string constants used in protocol
messages and zone lookups. This replaces scattered hardcoded string literals
with type-safe constants, improving maintainability and reducing typo risks.

The ZoneNames namespace provides constants for core game zones: table, grave,
exile (rfg), hand, deck, sideboard, and stack.
2026-02-26 19:53:58 -05:00
RickyRister
bdb42bbbbd
[VDE] Separate layout settings for visual deck editor (#6595) 2026-02-08 13:37:56 -08:00
RickyRister
ac7ff3a0e9
[LayoutSettings] Refactor how widgetSize settings are managed (#6594) 2026-02-08 05:07:53 -08:00
RickyRister
1eb6027443
clean up freeDocksSize in tabs with dockWidgets (#6593) 2026-02-08 05:07:40 -08:00
RickyRister
edc8691731
[LayoutSettings] Don't return by const value (#6592)
* [LayoutSettings] Don't return by const value

* fix compile failure
2026-02-07 20:42:23 -08:00
RickyRister
804a60f1ea
[LayoutSettings] Move over layout settings in global.ini (#6587)
* [LayoutSettings] Move over some settings from general

* remove unused setting
2026-02-07 19:51:12 -08:00
transifex-integration[bot]
a80a0531a6
Translate oracle/oracle_en@source.ts in fr (#6544)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'fr'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2026-02-07 21:48:00 -05:00
RickyRister
24bc713ba8
[DeckListModel] Fix deck hash not updating on card node add/remove (#6584) 2026-02-07 21:47:50 -05:00
dependabot[bot]
4884640070
Bump ssciwr/doxygen-install from 1 to 2 (#6585)
Bumps [ssciwr/doxygen-install](https://github.com/ssciwr/doxygen-install) from 1 to 2.
- [Release notes](https://github.com/ssciwr/doxygen-install/releases)
- [Commits](https://github.com/ssciwr/doxygen-install/compare/v1...v2)

---
updated-dependencies:
- dependency-name: ssciwr/doxygen-install
  dependency-version: '2'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 21:47:41 -05:00
RickyRister
8d7535c039
[LayoutSettings] Reorganize hierarchy in settings file (#6586)
* [LayoutSettings] Reorganize hierarchy in settings file

* rename stuff since we're moving settings later
2026-02-07 21:45:33 -05:00
RickyRister
32aa60bb14
[Oracle] Move oracle settings to separate file (#6588) 2026-02-07 21:44:49 -05:00
dependabot[bot]
3ada27eae1
Bump webpack from 5.99.9 to 5.105.0 in /webclient (#6590)
Bumps [webpack](https://github.com/webpack/webpack) from 5.99.9 to 5.105.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Changelog](https://github.com/webpack/webpack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack/compare/v5.99.9...v5.105.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-version: 5.105.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 21:43:51 -05:00
RickyRister
a096a0e3bb
[VDE] Reduce spacing in deck view toolbar (#6591) 2026-02-07 21:43:41 -05:00
BruebachL
d410078673
Refresh chat view colors on theme changed. (#6581)
Took 35 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-01-28 21:54:11 +01:00
BruebachL
bf5891a910
[ThemeManager] Proper Fusion Palettes (#6580) 2026-01-28 15:36:28 -05:00
RickyRister
c7249dfbd9
[PrintingSelector] Don't change font size (#6573)
* [PrintingSelector] Don't change font size

* remove connection to slider

* update comments
2026-01-28 09:39:54 -08:00
RickyRister
1b29e0bfa8
[PrintingSelector] Reduce spacing (#6574)
* [PrintingSelector] Reduce spacing

* align top

* reduce spacing in flowLayout
2026-01-27 20:50:46 -05:00
RickyRister
5cc5767c87
[CardInfoPictureWidget] Refactor constant fields to static const (#6575)
* [CardInfoPictureWidget] Refactor constant fields to static const

* rename constants

* reformat

* comment out unused
2026-01-27 20:50:19 -05:00
RickyRister
165c4ddd2a
[PrintingSelector] Properly clamp text size to picture on load (#6576) 2026-01-27 20:49:54 -05:00
Rob Blanckaert
7b64970e97
[App] Add Fusion Theme (#6577)
Adds a new default theme that causes the QT Fusion theme to be
selected. This theme looks a bit nicer than 'Windows' and supports
both light and dark mode out of the box.
2026-01-27 20:49:40 -05:00
ebbit1q
5309dd17be
fix typo (#6572) 2026-01-25 20:44:03 -05:00
transifex-integration[bot]
364470b3c8
Updates for project Cockatrice and language en_US (#6543)
* Translate oracle/oracle_en@source.ts in en_US

100% translated source file: 'oracle/oracle_en@source.ts'
on 'en_US'.

* Translate cockatrice_en@source.ts in en_US

100% translated source file: 'cockatrice_en@source.ts'
on 'en_US'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2026-01-25 16:51:03 -05:00
transifex-integration[bot]
915da79cad
Translate cockatrice/cockatrice_en@source.ts in de (#6541)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2026-01-25 16:50:40 -05:00
BruebachL
630c71f123
[VDE] Insert at correct index onDataChanged() instead of just appending. (#6556)
Took 25 minutes

Took 3 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-01-25 16:06:06 -05:00
ebbit1q
0b4e7be596
followup to #6563 (#6569)
* mess with the font rendering of the home screen until it works

* add more fonts

* increase font weight

* fix outline on the text
2026-01-25 16:05:53 -05:00
ebbit1q
303bd8b607
detect recursive redirects (#6570)
* detect recursive redirects

* handle failure with normal failure handler
2026-01-25 16:05:19 -05:00
RickyRister
c02cf5e89e
[VDE] Fix crash from alt-click when card has unknown set (#6566) 2026-01-25 01:36:10 -08:00
ebbit1q
92f02fa4ee
mess with the font rendering of the home screen until it works (#6563)
* mess with the font rendering of the home screen until it works

* add more fonts
2026-01-25 01:37:19 -05:00
ebbit1q
49e6cf95c4
fix package description (#6565) 2026-01-24 22:34:53 -05:00
ebbit1q
8a126263a9
do not ignore return value of opening log in servatrice when rotating (#6564) 2026-01-24 15:05:26 -05:00
ebbit1q
afdb385770
move returning cards to server_game (#6561)
lock the game mutex instead of player mutex when returning cards
2026-01-24 12:54:29 -05:00
tooomm
5b8897231d
CI: Include submodules in repo checkout (Docs deployment) (#6557)
* Enable submodule checkout in documentation build

* Change submodule checkout to recursive
2026-01-24 13:24:19 +01:00
BruebachL
ffc55aff10
[VDE] Add shortcut to increment cards [Alt + LMB] (#6555)
Took 13 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-01-24 11:28:06 +01:00
tooomm
2b372c14e4
Docs: Use doxygen-awesome-css theme (#6512)
* add doxygen-theme-css submodule

* enable theme and disable not needed code references

* hide nav sync button

* css and cleanup

* Move comments to dedicated README to not fail config check
2026-01-24 11:22:43 +01:00
BruebachL
12b5525a2d
[TabArchidekt] Cleaner filters, infinite scrolling, and a "go back button" (#6545)
* [TabArchidekt] Cleaner filters, infinite scrolling, and a "go back button"

Took 46 minutes

Took 5 seconds

* Fix infinite scroll triggering in detail view.

Took 25 minutes

Took 3 seconds

* Use setLabelText() so it's white

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-01-24 11:21:12 +01:00
RickyRister
3c48d92663
[DeckEditor] Show info in PrintingSelector dock when override printings enabled (#6554)
* don't hide printing selector dock

* extract warning message to separate file

* create printing disabled info widget
2026-01-24 02:20:16 -08:00
BruebachL
948ec9e042
[VDE] Accurately represent card amounts (#6547) 2026-01-23 08:47:08 -05:00
RickyRister
5a274fdbed
[DeckListModel] Mark all cards in token zone as legal (#6551) 2026-01-23 02:35:36 -08:00