Files
UE5-Modular-Game-Framework/docs/blueprints/06-ui/52_WBP_MenuFlowController.md
Lefteris Notas 411edea8ce add blueprints
2026-05-19 13:22:27 +03:00

2.8 KiB

WBP_MenuFlowController — Widget (Menu Flow Controller)

Parent: UUserWidget (non-visible overlay that lives under SS_UIManager) Depends On: SS_UIManager, GI_GameFramework, SS_SaveManager


Purpose

Orchestrates transitions between MenuFlow states: SplashScreen > MainMenu > Settings transitions > Loading transitions > Level transitions > Credits > Quit.

Variables

Name Type Description
CurrentFlowState E_MenuFlowState Current flow state
FadeWidget Image Black full-screen fade image
FadeDuration Float Fade duration in seconds (1.0)
AnimFadeIn WidgetAnimation Fade from 0 to 1 opacity
AnimFadeOut WidgetAnimation Fade from 1 to 0 opacity
bIsTransitioning Bool Block input during transition

Enums

E_MenuFlowState
{
    SplashScreen,
    MainMenu,
    Settings,
    Loading,
    InGame,
    Paused,
    Credits,
    Quit
}

Functions

Name Inputs Outputs Description
TransitionToState NewState: E_MenuFlowState Fade out, switch state, fade in
OnSplashComplete Auto-transition to MainMenu after splash timer
OnFadeOutComplete Switch visibility, load levels, then fade in
OpenMainMenu OpenLevel "MainMenu", then TransitionToState MainMenu
StartNewGame Fade out, OpenLevel first level, set InGame
ReturnToMainMenu OpenLevel "MainMenu", TransitionToState MainMenu
ShowCredits OpenLevel "CreditsMap", TransitionToState Credits
IsTransitioning Bool Query lock

Blueprint Flow — Menu Flow Transitions

flowchart LR
    A[Splash] -->|timer| B[MainMenu]
    B -->|New Game| C[Fade Out]
    C --> D[OpenLevel FirstLevel]
    D --> E[Fade In]
    E --> F[InGame]
    B -->|Settings| G[Push Settings Menu]
    G -->|Back| B
    F -->|ESC| H[Push Pause Menu]
    H -->|Resume| F
    H -->|Quit to Menu| I[Fade Out]
    I --> J[OpenLevel MainMenu]
    J --> B
    F -->|Death| K[Fade to Black]
    K --> L[Respawn or AltDeathSpace]
    F -->|Credits| M[OpenLevel Credits]

Communications With

Target System Method Why
SS_UIManager Push/Pop/Close/Open Menu lifecycle
GI_GameFramework SetGamePhase, dispatchers Phase transitions
SS_SaveManager Save/Load functions Save slots
WBP_HUDController Parent reference Fade coordination

Reuse Notes

  • Manages transitions centrally — no individual menu needs to open levels or handle fade logic
  • Split from original bundled 36_WBP_MenuWidgets.md per Clean Slate refactoring plan