unfurl

UIFramework

Screens on layers, input routing, and keyboard, mouse, and gamepad selection for Unreal Engine.

Screens on layers, input routing, and keyboard, mouse, and gamepad selection for Unreal Engine.

πŸ‘€ Summary

NsUIFramework controls UI interaction for each local player. It opens and closes screens on three layers, decides which screen gets input, moves the selection with keyboard, mouse, and gamepad, and routes Confirm and Back. It also sets the input mode and the mouse cursor, so game code does not call SetInputMode. A HUD class opens start screens, and a second subsystem shows floating texts over world points.

NsUIFramework does not style widgets, animate screens, or show input prompt icons. It does not replicate: each machine shows its own UI.

πŸ“¦ Features

βš™οΈ Requirements

Unreal Engine 5.7+

πŸ› οΈ Installation

  1. Clone or download this repository.
  2. Copy the NsUIFramework folder into the Plugins folder of your project.
  3. For C++, add "NsUIFramework" to the module dependencies in Build.cs.
  4. Generate the project files and enable the plugin.
  5. Optional: open Project Settings > Game > NsUI Framework, and change the keys.

πŸš€ Getting Started

Blueprint:

  1. Make a Widget Blueprint with NsUIWidget as the parent.
  2. Call Open Screen with a player controller, the widget class, and the layer Menu.
  3. Call Close Screen with the widget to close it, or push Back.

C++:

#include "NsUISubsystem.h"

UNsUISubsystem* const UI = LocalPlayer->GetSubsystem<UNsUISubsystem>();
UUserWidget* const Screen = UI->OpenScreen(PauseMenuClass, Context, ENsUILayer::Menu);

UI->CloseScreen(Screen);
UI->CloseAll(ENsUILayer::Modal);

The subsystem owns the screens that OpenScreen makes. It keeps the context object alive until the screen closes.

To handle Confirm and Back, implement Handle Ns Screen Confirm and Handle Ns Screen Cancel in the screen. In C++, override HandleNsScreenConfirm_Implementation and HandleNsScreenCancel_Implementation. Return true when the screen uses the action.

πŸ—‚οΈ Layers

Layer Use Gameplay input with Automatic
Game HUD parts that take input during play Allowed
Menu Menus such as pause or settings Blocked
Modal Popups such as confirmations Blocked

Modal comes first, then Menu, then Game. In one layer, the last screen to open has priority. Set bInteractive to false for prompts and toasts that take no input.

πŸ”§ API

Screens

Screen Events

Selection

World Popups

Debug

🚧 Limits

πŸ“š Documentation


Contact