# XWUIGameItemCompare

A side-by-side item comparison panel that places `itemA` and `itemB` in two columns with rarity-colored name headers, then lists every stat present on either item. For each stat it shows both values and, when `highlightBetter` is on, tints the higher value green and the lower red; with `showDelta` enabled it also prints the signed B-minus-A difference (e.g. `+4`, `-2`) between the columns. Useful as an equip-comparison tooltip; refresh both sides at once with `updateData({ itemA, itemB })`.

## Basic Usage

Shows two items side by side with per-stat deltas and better/worse coloring.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A two-column item comparison with green/red stat highlighting and signed delta values.
```

## Weapon Upgrade

An equipped-vs-drop comparison where a button swaps in a stronger candidate via `updateData()` to re-score the deltas.

```example
file: examples/WeaponUpgrade.ts
html: examples/WeaponUpgrade.html
title: Weapon Upgrade
description: A weapon comparison that replaces itemB with a legendary via updateData() and recomputes deltas.
```

## Armor Tradeoff

A side-grade comparison with mixed gains and losses and `showDelta` off, so only better/worse colors guide the choice.

```example
file: examples/ArmorTradeoff.ts
html: examples/ArmorTradeoff.html
title: Armor Tradeoff
description: A delta-free armor side-grade where green/red value coloring alone marks the better stat.
```

```api
```
