Your Own UI
Studios with their own interface can use the plugin's logic with their own look, or drop the plugin's look into their own screens. Three levels, all reading the same settings as the plugin's menu (no copy, no second source of truth), all acting for the widget's owning player in split-screen.
On this page
| Level | You get | You draw |
|---|---|---|
| 1. Descriptors | Everything about a setting or a page, as data | Everything |
| 2. Building blocks | Rows, lists, key bindings and section titles that handle values, focus, gamepad navigation and refreshes | The look, in your Widget Blueprints (start from the templates) |
| 3. Native widgets | The plugin's own look, anywhere in your UMG | Nothing |
1. Descriptors
| Node (Neo Settings › Model) | Returns |
|---|---|
| Get Setting Info | A Neo Setting Info: Kind (toggle, slider, choice, button, info), Label, Description, Options or Min/Max/Step and Format, Value and Value Text, Visible, Enabled and Disabled Reason, Pending, Restart Required, Changed, Per Player, Set By Other Player, costs |
| Get Page Ids | The pages the player sees, in menu order |
| Get Page Info | A page: Label, Icon, its visible Sections with their Setting Ids; on a controls page (Bindings), the actions the player can rebind, with their keys |
| Format Setting Value | A value written as the menu writes it ("85°", "1920 × 1080", "On") |
| Has Pending Settings, Discard Pending Settings, Apply Pending Settings | Changes that wait for Apply |
| Get Display Confirmation, Keep Display Changes, Revert Display Changes | The display change that waits to be kept: seconds left, the settings it changed |
| Is Restart Required | A change that needs a restart (Graphics API) was made |
| Are Settings Loaded | The saved settings are loaded and applied |
| Get Theme Color, Get Theme Font | A color of the style's palette (accent, text, surface...) and a font by role (display, title, body, bold, mono), so your HUD matches the style |
Refresh when the player subsystem fires On Setting Changed (a value) or On Settings State Changed (a row appeared, was grayed, started waiting for Apply...); read the descriptors again rather than keeping a copy.
Your own settings screen
Two ways to change a value:
- Set Setting Value As Player changes it as the settings menu does when the player picks it: a display mode (Apply Mode Confirm: monitor, window mode, resolution, HDR) is on screen at once and taken back unless Keep Display Changes is called before the countdown ends (Display Confirm Seconds, 15 by default); a setting with Apply Mode Pending waits for Apply Pending Settings. Use it for what the player picks in your screen.
- Set Setting Bool / Float / String / Value change it from your game's code: applied at once and saved, with no countdown and no Apply.
The player subsystem's On Display Confirmation Changed fires when a display change starts waiting and when it stops (kept, reverted, its countdown ended, a reset, a level change): show your own "Keep these display settings?" with Get Display Confirmation's Seconds Left while Waiting, and call Keep Display Changes or Revert Display Changes from its buttons. An unconfirmed change is also taken back when the game quits. The display settings are shared: in split-screen only a player who may change the shared settings (player 1, unless Shared Settings For Other Players is Editable) sees a change waiting and can keep it.
The rest of a settings screen: Reset Setting, Reset Page and Reset All Settings act at once (ask the player first); Run Quality Benchmark runs the Graphics page's benchmark; Is Restart Required tells when to show a restart notice; Discard Pending Settings answers "leave without applying?". Changes that still wait for Apply at a hard level change are dropped, with a toast of the plugin: apply or discard them before you travel.
The saved values are applied when the game starts, usually before your first widget, and applying them fires no On Setting Changed. Read the values when Are Settings Loaded is true, else on the player subsystem's On Settings Loaded. In C++, the player subsystem's settings events also have a native form, for handlers that are not UFUNCTIONs: On, On, On and On; Call
#include "NeoSettingsPlayerSubsystem.h"
/** The settings screen of a game's own UI: the values, rules and saving are the plugin's, the look is the game's. */
class FMySettingsViewModel
{
public:
void Bind(const ULocalPlayer* Player)
{
Settings = Player != nullptr ? Player->GetSubsystem<UNeoSettingsPlayerSubsystem>() : nullptr;
if (!Settings.IsValid())
{
return;
}
// The saved values are applied when the game starts, usually before this screen exists: read them now, or
// as soon as they are loaded.
Settings->CallOrRegisterOnSettingsLoaded(FSimpleDelegate::CreateRaw(this, &FMySettingsViewModel::ReadAll));
Settings->OnSettingChangedNative.AddRaw(this, &FMySettingsViewModel::OnSettingChanged);
Settings->OnDisplayConfirmationChangedNative.AddRaw(this, &FMySettingsViewModel::OnDisplayConfirmation);
}
~FMySettingsViewModel()
{
if (Settings.IsValid())
{
Settings->OnSettingsLoadedNative.RemoveAll(this);
Settings->OnSettingChangedNative.RemoveAll(this);
Settings->OnDisplayConfirmationChangedNative.RemoveAll(this);
}
}
/** The player picked a window mode in this screen: it is on screen at once, and kept only if the player says so. */
void PickWindowMode(const FString& Mode)
{
FNeoSettingsValue Value;
Value.Type = ENeoSettingsValueType::String;
Value.String = Mode;
Settings->SetSettingValueAsPlayer(TEXT("display.window_mode"), Value);
}
void OnKeepPressed() { Settings->KeepDisplayChanges(); }
void OnRevertPressed() { Settings->RevertDisplayChanges(); }
private:
TWeakObjectPtr<UNeoSettingsPlayerSubsystem> Settings;
void ReadAll()
{
UE_LOG(LogTemp, Log, TEXT("Field of view %.0f"), Settings->GetSettingFloat(TEXT("gameplay.fov"), 90.0f));
}
void OnSettingChanged(const FString& SettingId, const FNeoSettingsValue& Value)
{
UE_LOG(LogTemp, Log, TEXT("%s changed"), *SettingId);
}
void OnDisplayConfirmation()
{
// Show your own "Keep these display settings?" while bWaiting, with SecondsLeft; hide it when it ends: kept,
// taken back at the end of the countdown, or by a reset.
const FNeoDisplayConfirmation Confirmation = Settings->GetDisplayConfirmation();
UE_LOG(LogTemp, Log, TEXT("Keep the display change? %s, %.0f s left"), Confirmation.bWaiting ? TEXT("waiting") : TEXT("done"),
Confirmation.SecondsLeft);
}
};To translate the menu's texts with your project's localization, see Localization.
#include "NeoSettingsLibrary.h"
void LogGraphicsPage(APlayerController* Player)
{
// The page as this player's menu shows it: visible sections and settings, values, grayed rows and why.
const FNeoPageInfo Page = UNeoSettingsLibrary::GetPageInfo(Player, TEXT("graphics"), Player);
for (const FNeoSectionInfo& Section : Page.Sections)
{
for (const FString& SettingId : Section.SettingIds)
{
const FNeoSettingInfo Info = UNeoSettingsLibrary::GetSettingInfo(Player, SettingId, Player);
UE_LOG(LogTemp, Log, TEXT("%s: %s %s"), *Info.Label.ToString(), *Info.ValueText.ToString(),
*Info.DisabledReason.ToString());
}
}
}2. Building blocks (your look)
Abstract User Widget bases to subclass in a Widget Blueprint. Each refreshes itself on the player's events, changes values the way the menu does (a display mode asks the player to keep it; a setting applied with Apply waits for it), and handles keyboard and controller: Left and Right step the value, Accept flips a toggle or runs a button.
| Base | Name these widgets in the designer (all optional, unless said) | Notes |
|---|---|---|
| Neo Setting Widget | LabelText, ValueText, Description, ReasonText (Text Blocks) | Setting Id (drop-down); On Refresh (Info) draws anything else; Set Value, Step, Reset To Default |
| Neo Toggle Setting Widget | CheckBox | |
| Neo Slider Setting Widget | Slider | Its range and step follow the setting |
| Neo Choice Setting Widget | PrevButton, NextButton, ComboBox (Combo Box String) | |
| Neo Action Setting Widget | Button | Runs the button's action, its question first |
| Neo Key Binding Widget | KeyButton, LabelText, KeyText, KeyImage, PlateImage | Action, Device, Key Slot; On Key Refresh; captures through the plugin's rules (reserved keys refused, conflicts asked) |
| Neo Section Header Widget | LabelText | On Section |
| Neo Settings List | Rows (a Vertical Box or a Scroll Box): required | A whole page with your rows |
Use Style gives the bound texts the fonts and colors of the menu's rows in the project's style (the templates tick it; untick it to style them yourself). Collapse When Hidden (on) collapses a row while its setting is not offered to the player (platform, hardware, its conditions).
Neo Settings List builds a page: a header per section (Section Header Class), a row per visible setting with the class you give its kind (Row Classes: a kind without a class is skipped), and on a controls page a Key Binding Row Class row per action and key slot. It keeps the focused row when it rebuilds (by setting id), links the rows for D-pad navigation, and lists the menu's Advanced settings unless Show Advanced is off. Set Page shows another page, Find Row returns a setting's row.
An action with several rows on one device (the four directions of a 2D move) shows its keys in a list but cannot be rebound from a Key Binding widget (its button is grayed); the plugin's settings menu rebinds each direction.
The templates
The plugin ships six Widget Blueprints in its content folder / (in the Content Browser, tick Settings > Show Plugin Content). Duplicate them into your own content and change the copies; the originals are remade with each version of the plugin.
| Template | Based on | Holds |
|---|---|---|
WBP_ | Neo Toggle Setting Widget | Label Text, Value Text, Check Box |
WBP_ | Neo Slider Setting Widget | Label Text, Slider, Value Text |
WBP_ | Neo Choice Setting Widget | Label Text, Prev Button, Value Text, Next Button |
WBP_HS_KeyRow | Neo Key Binding Widget | Label Text, Key Button with Plate Image, Key Image, Key Text |
WBP_ | Neo Section Header Widget | Label Text |
WBP_ | Neo Settings List | Rows (a Scroll Box) using the five above, showing the Gameplay page |
Their look is neutral: the texts take the style's fonts and colors, the controls keep the engine's. Your copies are yours: the plugin never edits them.
3. Native widgets (the plugin's look)
Find them in the UMG palette under Neo Settings.
| Widget | What it is |
|---|---|
| Neo Settings Panel | The whole settings menu inside your widget. It does not change the input mode: your menu keeps it. Theme, first Page, Draw Backdrop, From Main Menu; On Back Requested when the player backs out of its first level; Focus Panel. |
| Neo Setting Row | One row exactly as the menu draws it (label, control, value, changed marker, grayed state), for a volume slider in your pause screen or a difficulty choice in a new-game screen. Setting Id, Theme; On Value Changed; Focus Row. Left and Right change it, Accept flips or runs it; Up and Down are left to your layout. It draws nothing while its setting is not offered to the player. |
| Input Prompt | The key or button of an action (or a key) for the owning player, drawn like the menu's prompts, with an optional Label. It follows the device the player uses, the Button Prompts setting and rebinds by itself. Action, Key, Label, Show Label, Family, Size, Tint, Plate Tint, Hide When Unbound. |
| Rebind Button | A themed keycap for an action's key; clicking or pressing it waits for a new key and binds it with the plugin's rules and conflict dialog. Action, Device, Key Slot, Theme; On Rebound (New Key). |
The Panel acts for its owning player: that player's values and controls, its controller only, its questions and messages in its part of the screen. To show one page in your own tabs, use a Neo Settings List (your look) or Neo Setting Rows (the plugin's look).
In the editor
The blocks show the editor's own settings in the UMG designer. Setting Id fields and pins offer every id in a drop-down; when a Blueprint compiles, the id typed in a node's pin is checked: unknown or of the wrong kind (HSP213), or an optional setting you did not enable (HSP212).
Something not as described? Every code the editor shows has its own entry in Troubleshooting.