48 lines
2.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
sidebar_position: 12
---
# Popup Panel
## Overview
The **Popup Panel** is a temporary UI element that overlays the main game content to display additional information or user options, such as exit prompts or disconnection notices.
| Exit Popup | Disconnect Popup | Free Rounds Popup |
|------------|------------------|--------------|
| ![Exit Popup](../img/05-main-scene/popup-exit-game.png) | ![Disconnect Popup](../img/05-main-scene/popup-disconnet.png) | ![Free Rounds Popup](../img/05-main-scene/freeround-counter/freerounds-international.png) |
## Multiple Popup Panel
The **Multiple Popup Panel** is pre-integrated into the main scene via the `template-main-game` prefab, allowing multiple popups to be managed efficiently.
![Popup in Game](../img/05-main-scene/popup-panel-in-game.png)
**Base Settings**:
- **Prefab**: `hyper-multiple-popup.prefab`
- **Path**: `assets/core-assets/hyper-core/packages/popup-panel/prefabs/hyper-multiple-popup.prefab`
- **Configuration**: Reference the prefab in the main scene to enable multiple popup layouts.
- ![Popup Configuration](../img/05-main-scene/popup-multi.png)
## Manual Popup Panel
Manually configured popups allow for custom textures and layouts, tailored to the games design. Note that the **Exit Game** popup is exclusive to the Desktop platform.
**Setup Steps**:
1. **Prepare Assets**:
- **Path**: `assets/game-assets/textures/desktop/preloads/main-game/exit`
- **Example**: ![Exit Game Popup Assets](../img/05-main-scene/exit-popup-game.png)
2. **Configure Prefabs**:
- Locate and clone the popup prefab to `assets/game-assets/prefabs`.
- Structure the prefab as shown:
- ![Prefab Structure](../img/05-main-scene/popup-exit-in-game.png)
3. **Apply Textures**:
- Manually drag and drop images onto the corresponding nodes in the editor.
- ![Texture Application](../img/05-main-scene/popup-draw.png)
4. **Preview Result**:
- Verify the popup displays correctly in the game.
- ![Popup Preview](../img/05-main-scene/popup-exit-game.png)
**Tip**:
- Ensure textures align with the games color theme and design specifications.
- Test the popup on Desktop to confirm functionality for the Exit Game feature.