add UI panel desktop
@ -88,9 +88,108 @@ The setup is very straightforward by using the `Generate Panel` command in each
|
||||
|
||||
## Setup UI Panel
|
||||
|
||||
> To be Added:
|
||||
> - Different UI Layout on Desktop and Mobile
|
||||
> - Which helper/p4f menu can be used
|
||||
### UI Panel Overview
|
||||
|
||||
#### Available Layouts
|
||||
|
||||
The UI system supports both desktop and mobile layouts design.
|
||||
|
||||
#### 🖥️ Desktop Layout
|
||||
- Full bottom bar with all controls visible
|
||||
- Horizontal layout maximizing screen width
|
||||
|
||||

|
||||
|
||||
#### 📱 Mobile Layout
|
||||
The mobile interface adapts to both landscape and portrait orientations:
|
||||
|
||||
| Orientation | Preview |
|
||||
|------------|----------|
|
||||
| Landscape |  |
|
||||
| Portrait |  |
|
||||
|
||||
|
||||
### :one: **Add Prefabs For Desktop**
|
||||
|
||||
#### Step 1: Setup Prefab Files
|
||||
|
||||
1. **Locate Required Prefabs**
|
||||
- Find `ui-bottom-bar-panel` prefab
|
||||

|
||||
|
||||
2. **Copy UI Assets**
|
||||
- Go to **core/editor** directory
|
||||
- Copy the `bottom-ui` folder
|
||||

|
||||
|
||||
3. **Place Assets in Game Directory**
|
||||
- Paste the copied `bottom-ui` folder
|
||||

|
||||
|
||||
#### Step 2: Configure Prefabs
|
||||
|
||||
1. **Core Prefabs**
|
||||

|
||||
|
||||
2. **Copied Prefab**
|
||||
|
||||
At here:
|
||||
|
||||
| Prefix to Remove | Original Prefab Name | Final Name |
|
||||
|-----------------|---------------------|------------|
|
||||
| `template-new-` | `template-new-ui-bottom-bar-panel` | `ui-bottom-bar-panel` |
|
||||
| `template-` | `template-button-auto-selection` | `button-auto-selection` |
|
||||
|
||||

|
||||
|
||||
|
||||
#### Button Auto Selection Label
|
||||
Use `template-label-auto-selection` to customize the `button-auto-selection`:
|
||||
- Modify text color
|
||||
- Add Label Outline component
|
||||
- Add Label Shadow component
|
||||

|
||||
|
||||
#### Ui Bottom Bar Panel Label
|
||||
Use `template-label-title` to customize the `ui-bottom-bar-panel`:
|
||||
:::tip
|
||||
[Detailed configuration the same Button Auto Selection Label](#button-auto-selection-label)
|
||||
:::
|
||||
Bottom bar labels include a localization component for multi-language support:
|
||||

|
||||
|
||||
#### FormatText
|
||||
|
||||
The `FormatText` property controls text formatting behavior for label components:
|
||||
|
||||
| Property | Description | Example |
|
||||
|----------|-------------|---------|
|
||||
| `default` | Initial formatting state | `false` |
|
||||
| `notify` | Formatting update callback | Updates when value changes |
|
||||
|
||||
|
||||
#### Step 3: Apply Textures
|
||||
|
||||
1. **Run the Helper Tool**
|
||||
- Open the UI Desktop Helper
|
||||
- Select texture assignment options
|
||||

|
||||
|
||||
2. **Verify Results**
|
||||
|
||||
**Auto Selection Component**
|
||||

|
||||
|
||||
**Bottom Bar Component**
|
||||

|
||||
|
||||
:::tip Success Verification
|
||||
✔️ Check all textures are correctly mapped
|
||||
✔️ Verify button states display properly
|
||||
✔️ Confirm UI layout matches design
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Setup Background
|
||||
|
||||
|
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.7 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/bottom-ui-desktop.png
Normal file
After Width: | Height: | Size: 153 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/component-locale.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 13 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/menu-landscape.png
Normal file
After Width: | Height: | Size: 267 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/menu-portrait.png
Normal file
After Width: | Height: | Size: 215 KiB |
After Width: | Height: | Size: 90 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/option-for-label.png
Normal file
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 14 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/rename-prefab.png
Normal file
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 23 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/result-buttom-bar.png
Normal file
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 18 KiB |