NeoSettingsDocsNeo Async Loading Screen
Menus and screensMenus and Flow

Menus and Flow

The plugin can run your game's front end: a main menu at startup, Play, a pause menu on Escape or Start, Return to Main Menu and Quit with their confirmations, and what happens to the menus when a level changes or a connection is lost. The pause menu is on by default; the main menu is off until you turn it on (the Setup tab's switches, or the fields below). A game with menus of its own turns the pause menu off, so it never gets a second Escape handler; the sessions the editor starts then lend Escape a test pause. The functions and nodes work whether the flow is on or not. Try it, in the Setup tab, plays your level with the whole flow on for one session and writes nothing (Quick Start).

On this page
  1. Main menu
  2. Pause menu
  3. The test pause
  4. Settings, Back and the screen stack
  5. Return to Main Menu and Quit
  6. Your own items
  7. Items with arrows
  8. Your own look for the menus
  9. Levels, travel and lost connections
  10. The travel fade
  11. Project Settings > Menus

Where it lives in Unreal terms: the flow belongs to the Neo Menu Subsystem (one per game instance, none on a dedicated server); each local player's screens belong to the Neo Settings Player Subsystem (one per local player). Nothing is added to your GameMode, HUD, PlayerController or GameInstance.

When it shows. At the game's first world start, after Return to Main Menu, and on every load of the Main Menu Map when you name one. Never on a network client joining a game, never on a dedicated server, and in Play In Editor only while Main Menu In Editor is ticked. A plain restart of the start map does not bring it back. It waits for player 1's controller (plus one frame, so your controller's BeginPlay runs first) and, when your project has Neo Async Loading Screen, for its loading screen to hide.

What it shows. Over your live level, with the style's backdrop; the game is not paused. The title is Game Title, else your project's Displayed Title, else the project's name; Title Image replaces it with your logo. The items, in order: Continue (hidden until your game sets can_continue), Play, Settings, Quit (desktop only, asks first).

Play. With Play Map empty, Play closes the menu and gives the game its input back. With Play Map set, it opens that map behind a fade to black (or behind the Neo Async Loading Screen). Either way On Play fires once the player is playing. Call Start Playing to do the same from your own code.

Continue. Set the fact can_continue when a save exists; the item then shows, and choosing it fires On Menu Event with continue. Load your save, then call Start Playing (or open the saved level):

C++
void UMySettingsListener::ListenToMenus(APlayerController* Player)
{
    if (UNeoMenuSubsystem* Menus = UNeoMenuSubsystem::Get(Player))
    {
        // The main menu's Continue item shows while game.can_continue is true.
        Menus->SetMenuFact(TEXT("can_continue"), true);
        Menus->OnMenuEvent.AddDynamic(this, &UMySettingsListener::HandleMenuEvent);
    }
}

void UMySettingsListener::HandleMenuEvent(FName EventName, APlayerController* Player)
{
    if (EventName == FName(TEXT("continue")))
    {
        // Load the player's save here, then start playing (or open the saved level).
        if (UNeoMenuSubsystem* Menus = UNeoMenuSubsystem::Get(Player))
        {
            Menus->StartPlaying();
        }
    }
}

Pause menu

Opening it. With Pause Menu ticked (the default; untick it when your game has a pause menu of its own), Escape and the controller's Start button open it through an input action of the plugin's own, added to each local player at the lowest priority: your own mapping of the same key wins, and your UI-only input mode blocks it, as with any game input. Open Pause Menu opens it from your code. It is refused while the main menu, the travel fade, the Neo Async Loading Screen or another plugin screen is up, while Set Pause Menu Allowed is false, and on a dedicated server.

C++
#include "NeoSettingsLibrary.h"

void SetCutscenePlaying(APlayerController* Player, bool bPlaying)
{
    // No pause menu while the cutscene plays; the pause keys open it again afterwards.
    UNeoSettingsLibrary::SetPauseMenuAllowed(Player, !bPlaying, Player);
}

Pausing. A standalone game is paused through the engine's Set Game Paused (your GameMode's rules apply) while Pause Game In Standalone is ticked; only the world it paused is unpaused. A networked game is never paused: the menu is titled "Menu" instead of "Paused" and offers Leave Game instead of Main Menu. In split-screen, the world stays paused while any player's pause menu is open; the other players see "Paused by Player 1" and can open their own.

Items. Resume, Settings, Main Menu (standalone, with the main menu on; asks first), Leave Game (networked; the host is told everyone will be disconnected), Quit (desktop; asks first). Questions put the focus on Cancel and need no hold.

Your own pause action. Set Pause Action to an Input Action of yours: the plugin listens to it and adds no key of its own. Tick Trigger When Paused on that action, or players 2 to 4 cannot open their pause menus once player 1 paused the game (HSP215).

Escape in Play In Editor. The editor normally stops Play In Editor on Escape. While Escape Opens Pause Menu In Editor is ticked (the default), Escape over the game viewport opens the pause menu instead, or goes back while a plugin screen is open; the toolbar's Stop button stays. Untick it to give Escape back to Stop.

The test pause

While Pause Menu is off (your game has a pause menu of its own), the sessions the editor starts still open the plugin's pause menu on the pause keys (Escape, the controller's Start), so you can reach Settings while your own pause menu does not open it yet:

  • Where. Play In Editor and a Standalone game the editor starts; a game you start by hand with the editor's binaries (UnrealEditor.exe <project> -game) too. Never in a packaged game: Development, Test and Shipping builds are compiled without the editor, and the test pause is not in them. Never in the preview worlds the editor's automation tests make; an automation test that starts a Play In Editor session gets it as any Play In Editor session does: untick Test Pause In Editor Sessions for such tests when they send Escape themselves.
  • How. The same path as the real pause menu: the plugin's pause action on the Pause Keys at the lowest priority (never your Pause Action, even when one is left set: that one opens the real pause menu only), so your own mapping of Escape wins and your UI-only input mode blocks it; in Play In Editor, Escape over the game viewport opens it even with Escape Opens Pause Menu In Editor unticked, and the toolbar's Stop stays. With CommonUI's viewport client, its action router takes Escape first and stops Play In Editor, as with the real pause menu.
  • The mark. The pause its key opens is always the plugin's own pause screen in the style you chose (your Pause Menu Widget Class is not used), with a TEST mark, "Editor only", in its top right corner. A pause menu your own code opens (Open Pause Menu) is your game's: your widget, no mark. Main Menu is not offered while the main menu is off. At the first Play In Editor where it runs, a toast names its key ("Esc · Settings (test pause)", or "Start" with a controller), once per project: the editor remembers it in Saved/NeoSettings/Editor.json once a player has shown it (a session without a viewport asks again next time).
  • The keys stay yours. Your own mapping of a pause key wins over the test pause (HSP201). On the controls pages, Escape, the controller's menu button and F13 stay reserved, as always (Input).
  • The switch. Menus > Test Pause In Editor Sessions (on by default), also Test pause in the Setup tab's Pause menu row. Turning the pause menu on ends it: the pause menu is then your game's, without the mark.
  • Your own pause menu. Copy node, in the Setup tab's Settings menu row, copies an Open Settings Menu node: paste it in a Blueprint graph, behind your own pause screen's Settings button. Nothing else changes. Once a Blueprint that calls it is compiled, the row says Opens from: Your button.

During Try it the pause menu is on for the session, so there is no test pause and no mark. Try it turns on the plugin's two menus; Main Menu from the pause menu shows the travel fade. With Neo Async Loading Screen, the loading screens follow its own settings.

Scroll the graph sideways.

Your own Settings button: Open Settings Menu. Tick From Main Menu when it opens from your main menu.

Settings, Back and the screen stack

Each player has one stack of screens: main menu or pause menu, settings over it, a dialog on top. Back (Escape, B, the menu button) always closes one layer: Settings returns to the menu below it, Back on the pause menu resumes. A screen takes the player's input while it is open and gives back exactly what it found (input mode, cursor, focus) when the last one closes; the key that closed it never reaches your pawn. While it is open it keeps the keyboard focus and the mouse: when the game viewport takes them (the game window's activation with Capture Mouse On Launch, a Set Focus or an input mode of yours), the screen takes them back before the next frame draws, so your pawn gets no key, click or mouse movement until the screen closes (HSP307 when something keeps taking them).

Node (Neo Settings › Menus)Does
Open Main Menu, Open Pause MenuOpens it for the player (returns false when refused)
Close All MenusCloses every plugin screen of the player
Is Any Menu OpenTrue while a plugin screen of the player is open
Return To Main MenuLeaves for the main menu (asks first when Confirm is ticked)
Quit Game With ConfirmationQuits after asking (the engine's Quit Game quits without asking)
Set Pause Menu AllowedRefuses the pause menu during a cutscene, allows it again after
Set Menu FactSets game.<name> for the menu conditions (can_continue...)

The player subsystem also reports On Screen Opened and On Screen Closed (with the reason: Player, Code, Travel, or Cleared when Remove All Widgets cleared the viewport, HSP304).

Return to Main Menu and Quit

Return To Main Menu in a networked game calls the engine's UGameInstance::ReturnToMainMenu (your session code runs). In a standalone game it opens Main Menu Map, else the map the game started on, else the Game Default Map, behind the travel fade (or the Neo Async Loading Screen). Quit Game With Confirmation asks first (focus on Cancel); a listen host is told everyone will be disconnected. Both use the question and the label of the shipped item, so they are translated.

Your own items

In Project Settings (Menus > Extra Main Menu Items, Extra Pause Menu Items), one entry per item:

FieldMeaning
IdThe item's id (credits): its full id is main.credits or pause.credits
LabelIts text (a translatable text of your project)
ActionPlay, Resume, Settings (with a Page), Open Level (with a Level), Restart, Main Menu, Quit, or Event (with an Event Name)
Confirm, Confirm TextAsk this question first (focus on Cancel)
DestructiveDrawn as destructive, never focused first
Desktop OnlyShown on desktop platforms only (Windows, macOS, Linux; a PC handheld such as the Steam Deck runs one); hidden on consoles and mobile
OrderShipped items use 10, 20, 30...: 25 goes between the second and the third

An Event item fires On Menu Event (Event Name, Player). Hidden Menu Items hides shipped items (main.quit, pause.main_menu...: the field offers them in a drop-down). An item with arrows is written in a recipe (Items with arrows).

In a recipe (see Recipes):

Recipe
menu main {
    item credits "Credits" {
        action event "credits"
        order 35
    }
}
override menu pause {
    item quit { visible when not game.in_tutorial }
}
hide main.continue

Conditions read settings and facts: game.* (your Set Menu Fact flags), net.standalone, net.client, net.host, platform.desktop... An item can be grayed with a reason: enabled when game.has_save else "No save yet."

Items with arrows

An item becomes a selector (a style, a difficulty, a profile) with an arrows line in a recipe: the menu draws a left and a right arrow at the ends of its label (the style's choice chevrons, in the label's color), and Left and Right on it (the arrow keys, the D-pad, the left stick, a click on an arrow) fire On Menu Event with the left or the right event, without the item's question, once per press: a held key does not repeat. Enter, the gamepad's bottom button and a click elsewhere on the item still run its action. On an item without arrows, Left and Right do nothing. In split-screen each player's menu pushes its own focused item.

Recipe
menu main {
    item difficulty_normal "Difficulty: Normal" {
        action event "difficulty_next"
        arrows "difficulty_previous" "difficulty_next"
        visible when game.difficulty_normal
        order 35
    }
}

The label is the recipe's, so a selector whose label names the current value is one item per value at the same order, each shown by a fact your game sets (Set Menu Fact difficulty_normal): the focus stays on the row while the value changes. Arrows are written in a recipe; Project Settings' extra items have none.

Your own menu widget reads Arrows on the item's view and sends Left and Right on it to Step Item (-1 or +1); Step Menu Item of the Neo Menu Subsystem does the same for a menu of your own.

Your own look for the menus

Set Main Menu Widget Class or Pause Menu Widget Class to a Widget Blueprint based on Neo Menu Screen Widget. The plugin keeps the items and their conditions, the flow, Back, focus and input; your widget only draws:

  1. In On Menu Refresh (Title, Items), build a button per item (Label; grayed when not Enabled, with Disabled Reason).
  2. On a button's click, call Run Item with the item's Id: it asks the item's question first when it has one.
  3. On an item whose Arrows is true, draw two arrows and call Step Item with -1 or +1 for Left and Right.
  4. Wire your back action to Request Back (the pause menu resumes).

Get Menu Items and Get Menu Title of the Neo Menu Subsystem give the same items for a menu of your own that the plugin does not open; Run Menu Item runs one, Step Menu Item pushes an arrow of one.

Levels, travel and lost connections

SituationWhat the menus do
Hard map change (Open Level, non-seamless travel)Screens close with reason Travel; an unconfirmed display change reverts; changes waiting for Apply are discarded with a toast saying so; a travel the menus start happens behind the travel fade, or behind the Neo Async Loading Screen when your project has it (Loading screens with Neo Async Loading Screen)
Seamless travelScreens stay open (Keep Menus Open On Seamless Travel) and move to the player's new controller; Play's own travel closes the main menu
Connection lost, travel failedScreens close, On Connection Lost (Reason) fires; with the main menu on, the player lands in it with a toast giving the cause and what to do

More in Split-Screen and Multiplayer.

The travel fade

The plugin draws no loading screen of its own. Without Neo Async Loading Screen, the travels its menus start (Play with a Play Map, an Open Level or Restart item, Main Menu, Leave Game) go through a plain fade to black: the game darkens in 180 ms, the level loads under the black, and the new map appears in 240 ms once it has begun play and one frame of it is drawn; with Reduce Motion, 100 ms each way. No style, no text, no tip. Nothing else fades: your own Open Level, a client following its server, the engine's return after a lost connection. With Neo Async Loading Screen, the same travels go behind its loading screen instead, never behind the fade.

  • On Travel Started fires when the travel itself starts, once the window is black: about 180 ms after the item was chosen (at once with Neo Async Loading Screen's screen).
  • While the fade is up, the pause menu is refused (Open Pause Menu returns false) and menu items do not run: no second travel, no Resume under the black. The main menu opening under the fade-in takes its input at once.
  • The fade is not a loading screen: Is Loading Screen Visible stays false and On Loading Screen Visibility Changed stays silent. In C++, UNeoMenuSubsystem::IsTravelFadeVisible() is true while it is up.

Details and the log lines: Loading screens with Neo Async Loading Screen.

Project Settings > Menus

FieldDefaultMeaning
Main MenuoffShow a main menu at startup and after Return to Main Menu
Main Menu MapemptyThe menu's own map; empty: the map the game starts on
Play MapemptyThe map Play opens; empty: play the map behind the menu
Main Menu In EditoronShow the main menu in Play In Editor too
Game Title, Title ImageemptyThe main menu's title, or a logo instead
Pause MenuonOpen the pause menu with the pause keys; turn it off when your game has its own
Pause KeysEscape, Gamepad Special RightKeys of the plugin's pause action; always reserved on the controls pages
Pause ActionemptyYour own Input Action instead of the keys
Pause Game In StandaloneonThe pause menu pauses a standalone game
Escape Opens Pause Menu In EditoronEscape opens the pause menu in Play In Editor (Stop stays on the toolbar)
Test Pause In Editor SessionsonWhile Pause Menu is off, the pause keys open the plugin's pause menu, marked TEST, in the sessions the editor starts; never in a packaged game (The test pause)
Extra Main Menu Items, Extra Pause Menu ItemsemptyYour items
Hidden Menu ItemsemptyShipped items to hide
Main Menu Widget Class, Pause Menu Widget ClassemptyYour look, the plugin's logic

Behaviour > Keep Menus Open On Seamless Travel (on) is described above. Out of scope: server browsers, lobbies, save-slot screens, credits screens, submenus.

In C++, the fields say what is saved; UNeoSettingsProjectSettings::IsMainMenuOn() and IsPauseMenuOn() say what applies in this process, Try it included. Read the functions when your code follows the plugin's flow, the fields when it describes the project.

Something not as described? Every code the editor shows has its own entry in Troubleshooting.