# XWUIGameBuildMenu

A tabbed building-piece picker for survival construction. Category tabs (`conf_comp.categories`, default foundations / walls / roofs / stairs / misc) filter a grid of `data.pieces` (`{ id, name, icon, category, materials }`) laid out in `conf_comp.columns` columns. Selecting a piece highlights it, shows a material-cost panel where each requirement is flagged met/unmet by comparing `available` vs `required`, and dispatches a `select` event; switching tabs dispatches `category-change`. Toggle the cost panel with `conf_comp.showMaterialCost`. Use `select(id)`, `filterCategory(category)`, and `updateData({ pieces, activeCategory, selectedId })` to drive it.

## Basic Usage

Tabbed grid of build pieces by category that shows the selected piece's material cost.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Category-tabbed building-piece grid with a met/unmet material-cost readout.
```

## Category Switch

Drives the menu with `filterCategory()` and `select()` to change tabs and surface a piece's cost panel.

```example
file: examples/CategorySwitch.ts
html: examples/BasicUsage.html
title: Category Switch
description: Programmatically switches the active category and selects a piece to reveal its material cost.
```

## No-Cost Grid

Hides the cost panel and widens the grid for two side-by-side decoration palettes.

```example
file: examples/NoCostGrid.ts
html: examples/BasicUsage.html
title: No-Cost Grid
description: Two wide, cost-free four-column build palettes for interior and exterior decoration.
```

```api
```
