# Storage Currency Element UGUI

## 💳 StorageCurrencyElementUGUI Class

A storage currency UI element for uGUI.

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

***

### 📦 Fields

| Access   | Field            | Type              | Description          |
| -------- | ---------------- | ----------------- | -------------------- |
| `public` | `icon`           | `Image`           | Currency icon.       |
| `public` | `amountLabel`    | `TextMeshProUGUI` | Amount label.        |
| `public` | `withdrawButton` | `Button`          | Withdraw button.     |
| `public` | `depositButton`  | `Button`          | Deposit button.      |
| `public` | `withdrawIcon`   | `Image`           | Withdraw icon image. |
| `public` | `depositIcon`    | `Image`           | Deposit icon image.  |

***

### 🧰 Methods

| Access    | Method                              | Returns       | Description                                      |
| --------- | ----------------------------------- | ------------- | ------------------------------------------------ |
| `private` | `Awake()`                           | `void`        | Subscribes to TMP pre‑render to trigger resize.  |
| `private` | `OnPreRenderText(TMP_TextInfo obj)` | `void`        | Starts coroutine to adjust label rect.           |
| `private` | `Resize()`                          | `IEnumerator` | Adjusts `amountLabel` width and rebuilds layout. |
