add docs fo mobile ui
@ -90,8 +90,6 @@ The setup is very straightforward by using the `Generate Panel` command in each
|
|||||||
|
|
||||||
### UI Panel Overview
|
### UI Panel Overview
|
||||||
|
|
||||||
#### Available Layouts
|
|
||||||
|
|
||||||
The UI system supports both desktop and mobile layouts design.
|
The UI system supports both desktop and mobile layouts design.
|
||||||
|
|
||||||
#### 🖥️ Desktop Layout
|
#### 🖥️ Desktop Layout
|
||||||
@ -103,62 +101,59 @@ The UI system supports both desktop and mobile layouts design.
|
|||||||
#### 📱 Mobile Layout
|
#### 📱 Mobile Layout
|
||||||
The mobile interface adapts to both landscape and portrait orientations:
|
The mobile interface adapts to both landscape and portrait orientations:
|
||||||
|
|
||||||
| Orientation | Preview |
|
| Orientation | Preview |
|
||||||
|------------|----------|
|
|-------------|----------|
|
||||||
| Landscape |  |
|
| Landscape |  |
|
||||||
| Portrait |  |
|
| Portrait |  |
|
||||||
|
|
||||||
|
|
||||||
### :one: **Add Prefabs For Desktop**
|
### UI Panel Desktop
|
||||||
|
|
||||||
#### Step 1: Setup Prefab Files
|
#### Step 1: Setup Prefab Editor
|
||||||
|
|
||||||
1. **Locate Required Prefabs**
|
| Step | Action | image |
|
||||||
- Find `ui-bottom-bar-panel` prefab
|
|------|---------|--------------|
|
||||||

|
| 1. Locate Prefab | Search for `ui-bottom-bar-panel` prefab |  |
|
||||||
|
| 2. Copy Assets | Navigate to `core/editor` directory |  |
|
||||||
|
| 3. Place Assets | Copy / Paste to game assets location |  |
|
||||||
|
|
||||||
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
|
#### Step 2: Configure Prefabs
|
||||||
|
|
||||||
1. **Core Prefabs**
|
##### Core Prefabs Structure
|
||||||

|
Navigate to the location where the prefabs:
|
||||||
|

|
||||||
2. **Copied Prefab**
|
|
||||||
|
|
||||||
At here:
|
|
||||||
|
|
||||||
|
##### Rename Prefabs
|
||||||
|
Rename the copied prefabs by removing unnecessary prefixes:
|
||||||
| Prefix to Remove | Original Prefab Name | Final Name |
|
| Prefix to Remove | Original Prefab Name | Final Name |
|
||||||
|-----------------|---------------------|------------|
|
|------------------|----------------------|------------|
|
||||||
| `template-new-` | `template-new-ui-bottom-bar-panel` | `ui-bottom-bar-panel` |
|
| `template-new-` | `template-new-ui-bottom-bar-panel` | `ui-bottom-bar-panel` |
|
||||||
| `template-` | `template-button-auto-selection` | `button-auto-selection` |
|
| `template-` | `template-button-auto-selection` | `button-auto-selection` |
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
#### Customize *`button-auto-selection`* Label
|
||||||
|
|
||||||
|
Use the `template-label-auto-selection` to customize the appearance of the label inside the `button-auto-selection` prefab.
|
||||||
|
|
||||||
|
| Component | Description |
|
||||||
|
| -------------------- | ------------------------------------------------- |
|
||||||
|
| **Label Outline** | Add an outline to make the text stand out. |
|
||||||
|
| **Label Shadow** | Add a shadow for better contrast and readability. |
|
||||||
|
| -------------------- | ------------------------------------------------- |
|
||||||
|
|
||||||
#### 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
|
#### Customize *`ui-bottom-bar-panel`* Label
|
||||||
Use `template-label-title` to customize the `ui-bottom-bar-panel`:
|
Use `template-label-title` to customize the `ui-bottom-bar-panel`:
|
||||||
:::tip
|
:::info
|
||||||
[Detailed configuration the same Button Auto Selection Label](#button-auto-selection-label)
|
*[Follow the same configuration as Button Auto Selection Labels](#customize-button-auto-selection-label)*
|
||||||
|
**Bottom bar labels include a localization component for multi-language support**
|
||||||
:::
|
:::
|
||||||
Bottom bar labels include a localization component for multi-language support:
|
|
||||||

|
|
||||||
|
|
||||||
#### FormatText
|

|
||||||
|
|
||||||
The `FormatText` property controls text formatting behavior for label components:
|
The `FormatText` property controls text formatting behavior for label components:
|
||||||
|
|
||||||
@ -167,27 +162,112 @@ The `FormatText` property controls text formatting behavior for label components
|
|||||||
| `default` | Initial formatting state | `false` |
|
| `default` | Initial formatting state | `false` |
|
||||||
| `notify` | Formatting update callback | Updates when value changes |
|
| `notify` | Formatting update callback | Updates when value changes |
|
||||||
|
|
||||||
|
---
|
||||||
|
#### Step 3: Setup Ui In Main Scenes
|
||||||
|
|
||||||
#### Step 3: Apply Textures
|
Create the following node configuration in your main scene:
|
||||||
|

|
||||||
|
|
||||||
1. **Run the Helper Tool**
|
##### Platform Node Spawner Settings
|
||||||
- Open the UI Desktop Helper
|
|
||||||
- Select texture assignment options
|
|
||||||

|
|
||||||
|
|
||||||
2. **Verify Results**
|
| Setting | Value | Description |
|
||||||
|
|---------|-------|-------------|
|
||||||
|
| Desktop Toggle | ✓ Enabled | Show prefabs for desktop platform |
|
||||||
|
| Mobile Toggle | ☐ Disabled | Hide prefabs for mobile platform |
|
||||||
|
| Target Prefab | `ui-bottom-bar-panel` | References prefab |
|
||||||
|
|
||||||
|
#### Step 4: Apply Textures
|
||||||
|
|
||||||
|
##### Texture Button Bar
|
||||||
|
✅ Checklist assets completed for bottom UI and button UI text
|
||||||
|
🔗 [Follow is by Complete Assets Structure Guide](http://localhost:3000/docs/category/game-asset-structure):
|
||||||
|

|
||||||
|
|
||||||
|
##### Run the Helper Tool
|
||||||
|
- Open the UI Desktop Helper
|
||||||
|
- Select texture assignment options
|
||||||
|

|
||||||
|
|
||||||
|
##### Verify Results
|
||||||
|
|
||||||
**Auto Selection Component**
|
*Auto Selection*
|
||||||

|

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

|

|
||||||
|
|
||||||
:::tip Success Verification
|
---
|
||||||
✔️ Check all textures are correctly mapped
|
|
||||||
✔️ Verify button states display properly
|
### UI Panel Mobile
|
||||||
✔️ Confirm UI layout matches design
|
|
||||||
:::
|
#### Step 1: Setup Prefab
|
||||||
|
| Step | Action | image |
|
||||||
|
|------|---------|--------------|
|
||||||
|
| 1. Locate Prefab | Search for `mobile-ui` prefab |  |
|
||||||
|
| 2. Place Assets | Copy to game assets location |  |
|
||||||
|
| 3. Locate Prefab | Search for `buy-feature` prefab |  |
|
||||||
|
|
||||||
|
#### Step 2: Rename Prefabs
|
||||||
|
Rename the copied prefabs by removing unnecessary prefixes:
|
||||||
|
| Prefix to Remove | Final Name |
|
||||||
|
|------------------|----------------------|
|
||||||
|
| `template-` | |
|
||||||
|
|
||||||
|
#### Step 3: Setup Ui In Main Scenes
|
||||||
|
|
||||||
|
Create the following node configuration in your main scene:
|
||||||
|

|
||||||
|
|
||||||
|
##### Platform Node Spawner Settings
|
||||||
|
|
||||||
|
| Setting | Value | Description |
|
||||||
|
|---------|-------|-------------|
|
||||||
|
| Mobile Toggle | ✓ Enabled | Show prefabs for mobile platform |
|
||||||
|
| Desktop Toggle | ☐ Disabled | Hide prefabs for desktop platform |
|
||||||
|
| Target Prefab | `mobile-ui` | References prefab |
|
||||||
|
|
||||||
|
#### Step 4: Apply Textures
|
||||||
|
|
||||||
|
##### Texture Mobile Ui
|
||||||
|
✅ Checklist assets completed for Mobile UI
|
||||||
|
🔗 [Follow is by Complete Assets Structure Guide](http://localhost:3000/docs/category/game-asset-structure):
|
||||||
|

|
||||||
|
|
||||||
|
##### Run the Helper Tool
|
||||||
|
- Open the UI Mobile Helper
|
||||||
|
- Select texture assignment options
|
||||||
|

|
||||||
|
|
||||||
|
##### Results
|
||||||
|
|
||||||
|
*main ui button added textures*
|
||||||
|
|  |
|
||||||
|
|
||||||
|
|
||||||
|
#### Step 4: Setup Color For Menu Mobile UI
|
||||||
|
|
||||||
|
*Gerenal picker color* using `helper-paint-color-ui-mobile`
|
||||||
|
|  |  |
|
||||||
|
|---------|-------|
|
||||||
|
|
||||||
|
|Ordinal number| Properties | Explaination | Example |
|
||||||
|
|--------------|------------|--------------|---------|
|
||||||
|
|1 | **Main Ui Normal Color** | pick color: #45AEFF |  |
|
||||||
|
|2 | **Main Ui Highlight Color** | pick color: #A8CBFF |  |
|
||||||
|
|3 | **Toggle State Off Color** | pick color: #45AEFF |  |
|
||||||
|
|4 | **Toggle State On Color** | pick color: #A8CBFF |  |
|
||||||
|
|5 | **Background Info Page Color** | pick color: #000000 | |
|
||||||
|
|6 | **Background Menu Color** | pick color: #000000 |  |
|
||||||
|
|7 | **Background Point Panel Color** | pick color: #000000 |  |
|
||||||
|
|8 | **Background Bottom Bar Color** | pick color: #FFFFFF |  |
|
||||||
|
|9 | **Button Quit Color** | pick color: #45AEFF |  |
|
||||||
|
|10 | **Button Cancel Color** | pick color: #616160 |  |1
|
||||||
|
|11 | **Label Balance Normal Color** | pick color: #7DFFDF |  |
|
||||||
|
|12 | **Label Balance Spin Color** | pick color: #FFFFFF |  |
|
||||||
|
|13 | **Button Plus Minus Auto Color** | pick color: #FFFFFF |  |
|
||||||
|
|14 | **Label Start Auto Color** | pick color: #FFFFFF |  |
|
||||||
|
|15 | **Label Outline Notification** | pick color: #FFFFFF |  |
|
||||||
|
|16 | **Total Win Medium Win Color** | pick color: #FFFFFF |  |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 49 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/background-menu.png
Normal file
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 73 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/btn-cancel-game.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/btn-quit-game.png
Normal file
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 260 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 23 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/in-scenes-game.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 21 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/mobile-ui-prefab.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 86 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/result-mobile-ui.png
Normal file
After Width: | Height: | Size: 434 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 27 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/search-mobile-ui.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/set-color-menu-ui.png
Normal file
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 27 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/toggle-off.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/toggle-on.png
Normal file
After Width: | Height: | Size: 19 KiB |