# XWUIGameStateMonitor

A live game-state overlay that pins to a screen corner and prints monospace key/value `entries` for runtime debugging, grouping rows under optional category headers. When a value changes it flashes the row briefly to draw the eye. Use it as a lightweight watch window: push values with `setState(key, value, category?)` (which updates the row in place and flashes on change), remove with `removeState(key)`, wipe with `clear()`, and read back with `getState(key)`. Position it with `position` (`top-left`/`top-right`/`bottom-left`/`bottom-right`), cap rows with `maxEntries`, and shrink it with the `compact` flag.

## Basic Usage

Mounts the monitor with no entries, so it renders the semi-transparent `STATE MONITOR` panel in the `top-left` corner with an empty list ready for `setState()` calls.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A top-left state monitor seeded with Engine/Player/World rows that flash on setState updates.
```

## Watched Variables

A grouped watch window tracking an FSM current-state alongside quest progress and story flags.

```example
file: examples/WatchedVariables.ts
html: examples/WatchedVariables.html
title: Watched Variables
description: Mixed string/number/boolean rows under AI/Quest/Flags headers, with changed entries flashing and an FSM advance.
```

## Compact Corner

A tight bottom-right performance HUD using compact mode and a capped row count.

```example
file: examples/CompactCorner.ts
html: examples/CompactCorner.html
title: Compact Corner
description: A bottom-right overlay with compact density and maxEntries capping it to a small FPS/memory readout.
```

```api
```
