2025-05-22 14:09:43 +07:00

2.5 KiB

sidebar_position
sidebar_position
10

Desktop Bottom Bar UI

Overview

The Bottom Bar UI provides a functional interface for gameplay controls on desktop, using a horizontal layout to maximize screen width.

Desktop Bottom Bar

Implementation

  1. Set Up Prefab Editor:

    • Locate Prefab:
      • Search for ui-bottom-bar-panel prefab.
      • Locate Prefab
    • Find Assets:
      • Navigate to core/editor directory.
      • Core Directory
    • Clone Assets:
      • Copy and paste to the game assets location.
      • Asset Placement
  2. Configure Prefabs:

    • Core Prefabs Structure:
      • Path: assets/core-assets/hyper-core/packages/ui/desktop-ui/prefabs
      • Directory Structure
    • Rename Prefabs:
      • Remove unnecessary prefixes:
        Prefix to Remove Original Name Final Name
        template-new- template-new-ui-bottom-bar-panel ui-bottom-bar-panel
        template- template-button-auto-selection button-auto-selection
      • Rename Example
    • Customize button-auto-selection Label:
      • Use template-label-auto-selection to adjust appearance.
      • Add Label Outline and Label Shadow for better readability.
      • Label Options
    • Customize ui-bottom-bar-panel Label:
      • Use assets/game-assets/editor/bottom-ui/template-label-title.
      • Include a localization component for multi-language support.
      • Localization Component
      • FormatText Properties:
        Property Description Example
        default Initial formatting state false
        notify Formatting update callback Updates when value changes
  3. Set Up UI in Main Scene:

    • Create a new node and configure in the main scene.
    • Main Scene Setup
  4. Apply Textures:

    • Ensure assets for bottom UI and button UI text are complete.
    • Texture Setup
  5. Run Helper Tool:

    • Configure the bottom bar UI using the helper tool.