refactor(z-values): replace magic Z-value numbers with ZValues constants

Magic numbers like 2000000007 are impossible to understand without
context. Named constants (ZValues::DRAG_ITEM) are self-documenting.

This intentionally renumbers overlay Z-values to use a cleaner offset
sequence. The relative stacking order is preserved, which is what
matters for correct rendering.

Each consumer now includes z_values.h and uses semantic constants
instead of magic numbers.
This commit is contained in:
DawnFire42 2026-03-02 01:28:18 -05:00
parent d22fa8b447
commit 652ca041b4
No known key found for this signature in database
GPG key ID: 24BB855EE2911B33
4 changed files with 12 additions and 8 deletions

View file

@ -5,6 +5,7 @@
#include "../player/player.h"
#include "../player/player_actions.h"
#include "../player/player_target.h"
#include "../z_values.h"
#include "../zones/card_zone.h"
#include "card_item.h"
@ -23,7 +24,7 @@ ArrowItem::ArrowItem(Player *_player, int _id, ArrowTarget *_startItem, ArrowTar
: QGraphicsItem(), player(_player), id(_id), startItem(_startItem), targetItem(_targetItem), targetLocked(false),
color(_color), fullColor(true)
{
setZValue(2000000005);
setZValue(ZValues::ARROWS);
if (startItem)
startItem->addArrowFrom(this);