# Stat Element

## 🧮 StatElement Class

VisualElement that displays a stat icon and text for hover details.

> **Namespace:** `Esper.Inventool.UI`\
> **Access:** `public`\
> **Type:** `class`\
> **Inherits:** `VisualElement`

***

### 📦 Fields

| Access | Field       | Type          | Description                     |
| ------ | ----------- | ------------- | ------------------------------- |
| public | iconElement | VisualElement | Displays the stat’s icon.       |
| public | statLabel   | Label         | Displays the stat’s text/value. |
| public | stat        | Stat          | The stat being represented.     |

***

### 🔧 Constructor

| Access | Constructor              | Description                              |
| ------ | ------------------------ | ---------------------------------------- |
| public | `StatElement(Stat stat)` | Initialize UI elements and set the stat. |

***

### 🧰 Methods

| Access | Method      | Returns | Description                                                             |
| ------ | ----------- | ------- | ----------------------------------------------------------------------- |
| public | `Refresh()` | void    | Update icon visibility, tint, and label text based on the current stat. |
