27 lines
1.2 KiB
Markdown
27 lines
1.2 KiB
Markdown
# Custom Button Widget & Asset Implementation
|
|
|
|
> Restoration of Prompt 69
|
|
|
|
## Goal
|
|
|
|
Implement a unified `CustomButtonWidget` that utilizes game assets (borders/panels) for a consistent UI look, and apply it to both `ItemCardWidget` and `BattleControls`.
|
|
|
|
## Tasks
|
|
|
|
1. **Create `CustomButtonWidget`** (`lib/widgets/common/custom_button_widget.dart`)
|
|
- Should support an image background (`assets/images/icons/borders/...`).
|
|
- Should support `onTap`.
|
|
- Should support arbitrary `child` content.
|
|
- Should support `size` or adaptive sizing.
|
|
- Optional: Support "Icon Button" mode for convenience or just composability.
|
|
|
|
2. **Refactor `BattleControls`** (`lib/widgets/battle/battle_controls.dart`)
|
|
- Replace `CustomIconButton` with `CustomButtonWidget` (or wrap content in it).
|
|
- Use appropriate border assets (e.g., `border_000.png` or specialized ones).
|
|
|
|
3. **Refactor `ItemCardWidget`** (`lib/widgets/common/item_card_widget.dart`)
|
|
- (Cancelled) User decided to keep the current version of ItemCardWidget without CustomButtonWidget integration.
|
|
|
|
4. **Asset Verification**
|
|
- Ensure `assets/images/icons/borders/` and `panel-border-...` are used correctly.
|