Game Menu (WBP_Game_Menu)

📂 Location: AVEII > UI > Menus

1. Role & Architecture

The WBP_Game_Menu serves as the primary container for the user interface during the active session. Structurally, it is a Canvas Panel that holds various independent sub-widgets (Panels), such as toolbars, search lists, and detail views.

A screenshot of the Unreal Engine UMG Designer tab for WBP_Game_Menu. It displays a large canvas panel containing several overlapping UI widget components, including a bottom taskbar and placeholder areas for different functional panels.
UMG Designer view of WBP_Game_Menu, showing the Canvas Panel acting as a container for various sub-widgets and the main taskbar.

Design Philosophy: Decoupled Logic

The graph for this menu contains minimal animation or internal logic for the specific panels it holds.

  • The Container Pattern: The Game Menu acts strictly as a Controller. It decides which panels should be visible, but it does not dictate how they appear or disappear.
  • Why use this approach? This adheres to the professional principle of Separation of Concerns.
    • Maintainability: It prevents the Main Menu from becoming a massive “God Object” full of spaghetti code.
    • Scalability: It allows designers to iterate on the animation or functionality of a specific panel (e.g., changing the slide-in animation of the WBP_Amenities_Panel) without touching the Game Menu logic or risking bugs in the main controller.

2. Mode Management

The application state is driven by the AVE Mode system. The Game Menu listens for state changes to adapt the interface dynamically.

  • Event Hook: OnModeChanged (Event Dispatcher from Game Instance).
  • Logic: When the mode changes (via the E_AVE_Mode enum), the menu switches context. For example:
    • Surroundings Mode: Activates WBP_SurroundingsPanel.
    • Amenities Mode: Activates WBP_Amenities_Panel.
    • Unit Search Mode: Activates WBP_UnitSearch_Panel.

3. Panel Management System

To manage the visibility of these overlapping tools efficiently, we utilize a centralized registry and function.

The TogglablePanels Registry

During the Construct event, we manually assign the specific UI panels existing on the Canvas to a local array variable called TogglablePanels. This creates a registry that allows us to iterate through UI elements programmatically later.

Function: ActivatePanels

This is the core utility for showing and hiding UI layers.

  • Inputs:
    • PanelsToActivate (Array of User Widget Objects)
    • bDeactivateOtherPanels (Boolean)
  • Logic:
    1. Clean Slate: If bDeactivateOtherPanels is true, the function iterates through the TogglablePanels registry and deactivates every widget found.
    2. Activate Target: It then takes the specific widgets passed in PanelsToActivate and calls their activation logic. This ensures that switching modes cleanly wipes the slate before presenting new tools, preventing UI clutter.

4. Contextual Information (Info Panels)

The Game Menu also acts as the host for dynamic world information, such as details about a selected Point of Interest (POI).

Event: ActivateInfoPanel

This custom event bridges the 3D world and the 2D UI.

  1. Trigger: Called when a user selects an object in the viewport.
  2. Data Source: It retrieves data from the BPC_InfoPanelHandler component attached to the selected actor.
  3. Visualization: Based on the data received, it initializes and displays the WBP_Info_Panel_Base.
    • Dynamic Templates: The system checks the handler to decide which specific template layout to load into the Info Panel, allowing different types of objects (e.g., Apartments vs. Parks) to display unique data structures.

related documentation

Configuring Project Settings

Configuring Project Settings To ensure AVE II functions correctly, you must verify specific project settings. These configurations establish the communication backbone between the UI and your Blueprint logic. Note: The BP_AVE_GI class is essential for handling global communication and persistent data between the UI and gameplay elements.

Read more >

Getting Started

Welcome to AVE II, a real‑estate visualization experience built in Unreal Engine 5. This guide helps you quickly understand the core systems, navigation, and workflow so you can begin integrating AVE II into your project or exploring its features. Overview AVE II provides an intuitive, high‑quality exploration system designed for

Read more >

POI Basics & Custom Tags

Get started with interactive navigation in AVE II. This beginner-friendly guide covers the essentials of placing BP_POI_Generic actors, customizing info panels with text and images, and organizing your locations into simple categories using tags.

Read more >

Framework

This section explains the core structure of AVE II. It covers which systems manage data, how responsibilities are split up, and how different parts of the project communicate with each other. These pages are designed to help you understand where to modify or add Blueprint logic. They explain which classes

Read more >

Game Instance (BP_AVE_GI)

The Game Instance (BP_AVE_GI) acts as the central mediator in AVE II. It owns a persistent runtime state, coordinates communication between systems, and ensures that gameplay logic, UI, and data remain decoupled. Roles and Responsibilities The BP_AVE_GI manages high-level orchestration across the framework. Its primary duties include: Implementation Examples The

Read more >