Cockatrice 2026-03-05-Development-2.11.0-beta.54
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
z_values.h File Reference

Centralized Z-value constants for rendering layer order. More...

Include dependency graph for z_values.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ZValues

Functions

constexpr qreal ZValues::childDragZValue (qreal hotSpotX, qreal hotSpotY)
 Compute Z-value for child drag items based on hotspot position.
constexpr qreal ZValues::tableCardZValue (qreal x, qreal y)
 Compute Z-value for cards on the table zone based on position.

Variables

constexpr qreal ZValues::OVERLAY_BASE = ZValueLayerManager::OVERLAY_BASE
constexpr qreal ZValues::HOVERED_CARD = ZValueLayerManager::overlayZValue(1.0)
constexpr qreal ZValues::ARROWS = ZValueLayerManager::overlayZValue(3.0)
constexpr qreal ZValues::ZONE_VIEW_WIDGET = ZValueLayerManager::overlayZValue(4.0)
constexpr qreal ZValues::DRAG_ITEM = ZValueLayerManager::overlayZValue(5.0)
constexpr qreal ZValues::DRAG_ITEM_CHILD = ZValueLayerManager::overlayZValue(6.0)
constexpr qreal ZValues::TOP_UI = ZValueLayerManager::overlayZValue(7.0)
constexpr qreal ZValues::CARD_BASE = 1.0
constexpr qreal ZValues::CARD_MAX = ZValueLayerManager::CARD_Z_VALUE_MAX

Detailed Description

Centralized Z-value constants for rendering layer order.

Z-values in Qt determine stacking order. Higher values render on top. These constants define the visual layering hierarchy for the game scene.

Layer Architecture

See z_value_layer_manager.h for detailed documentation on the three-layer architecture (Zone, Card, Overlay) and the rationale for Z-value choices.

Quick Reference

Layer Z-Value Range Purpose
Zone 0.5 - 1.0 Zone backgrounds, containers
Card 1.0 - 40,000,000 Cards on table (position-based)
Overlay 2,000,000,000+ UI elements above all cards