# XWUIGameStatDeltaPanel

A before/after stat comparison panel for previewing equipment and ability changes, rendering one row per entry in `data.stats` that shows the `current` value, the `proposed` value, and the signed delta between them - green for increases, red for decreases, neutral when unchanged. Directional arrows are gated by `conf_comp.showArrows` (default true) and each row can carry an optional `unit` suffix; pass `conf_comp.compactMode` for a tighter single-row layout. Use it in inventory and shop screens to show how equipping an item would shift the player's stats.

## Basic Usage

Constructs a stat delta panel with empty data and default config, so it mounts with no `stats` rows, arrows enabled, and compact mode off - ready to be populated with current/proposed values.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A before/after stat comparison panel showing increases and decreases with directional arrows.
```

## Pure Upgrade

A clean buff where every stat increases, rendering all-green rows with upward arrows.

```example
file: examples/PureUpgrade.ts
html: examples/PureUpgrade.html
title: Pure Upgrade
description: An Elixir of the Titan that raises every stat, so all rows show green increases with upward arrows.
```

## Compact Trade-off

A glass-cannon ring swap in compact mode, mixing offensive gains against defensive losses.

```example
file: examples/CompactTradeoff.ts
html: examples/CompactTradeoff.html
title: Compact Trade-off
description: A compactMode comparison with damage stats up, armor and resistances down, and one unchanged neutral row.
```

```api
```
