UI Widgets
Module PulseOnlineUI has ready widgets for the common online screens. They are CommonUI widgets that take their look from the Pulse UI theme of PulseFoundation (style roles Pulse.UI.*), so they match the rest of a game that uses the theme. Each is a C++ base class with optional bound widgets plus a default Widget Blueprint in /PulseOnline/UI; copy or subclass the default to change the layout.
| Widget | Default asset | What it does |
|---|---|---|
UPulseOnlineLoginStatusWidget | W_PulseOnlineLoginStatus | Avatar, name, login state with a colored dot, backend, log in / log out buttons. |
UPulseOnlineFriendsListWidget | W_PulseOnlineFriendsList | Friends of the local player (online first), count, refresh; entries W_PulseOnlineFriendEntry with avatar and invite button. |
UPulseOnlinePartyPanelWidget | W_PulseOnlinePartyPanel | Party with member count, create and leave; entries W_PulseOnlinePartyMember with avatar, leader marker, voice state (talking, muted; in the status line without icons of their own), mute for other members, promote and kick for the leader. |
UPulseOnlinePartyScreen | the class itself | Activatable party screen of menus: the party panel next to the friends list (invite), a button for the invite overlay of the platform, back. Builds its layout in code from the classes of the Online UI settings when it has no Widget Blueprint layout. |
UPulseOnlineVoiceIndicatorWidget | the class itself | Speaking indicator for the HUD: avatar and name of every player the owner hears talking (not out of range, not muted) and “Microphone on” while the own microphone transmits. Builds its layout in code. |
UPulseOnlineServerBrowserWidget | W_PulseOnlineServerBrowser | Server list with search and password, refresh; entries W_PulseOnlineServerEntry with players, ping, favourite and join. |
UPulseOnlineInviteDialogWidget | W_PulseOnlineInviteDialog | Activatable dialog for a received invite with the avatar of the sender: accept or decline. |
UPulseOnlineAvatarWidget | W_PulseOnlineAvatar | The avatar of a user: initials on the color of the name at once, the picture once it is loaded (see Avatars). Used by the widgets above. |
UPulseOnlineButton | W_PulseOnlineButton (+ Primary, Danger) | Text button used by the widgets. |
The widgets work for the owning local player and update themselves:
- the login status listens to
UPulseOnlineUserSubsystem::OnLoginStateChanged; - the friends list reads the friends on construct (
Query On Construct) and on refresh; the invite button invites into the party while the player is in one, else into the game session; - the party panel binds to the party view model of
PulseOnlineMVVM(UPulseOnlinePartyViewModelSubsystem) and rebuilds when members, leader or count change; - the server browser searches on construct (
Queryholds filters and sort order), filters by name while typing without a new search, and joins with the password of its password box; - the invite dialog accepts or declines through
UPulseOnlineSocialSubsystemand closes itself when the invite expires.
Bound widgets
All bound widgets are optional (BindWidgetOptional); a layout leaves out what it does not need.
| Widget | Names |
|---|---|
| Login status | Avatar, NameText, StateText, BackendText, StateDot, LoginButton, LogoutButton |
| Friend entry | Avatar, NameText, PresenceText, StatusDot, InviteButton |
| Friends list | FriendsBox (dynamic entry box), CountText, EmptyText, RefreshButton |
| Party member | Avatar (hidden for empty slots), NameText, StatusText, LeaderIcon, TalkingIcon, MutedIcon, KickButton, PromoteButton, MuteButton |
| Party panel | TitleText, MembersBox (dynamic entry box), CreateButton, LeaveButton, NoPartyText |
| Party screen | TitleText, PartyPanel, FriendsList, InviteOverlayButton, BackButton |
| Voice indicator | SpeakersBox (any panel, lines are added to it), MicrophoneText |
| Server entry | NameText, DetailsText, PlayersText, PingText, LockIcon, FavouriteIcon, JoinButton, FavouriteButton |
| Server browser | ServersBox (dynamic entry box), SearchBox, PasswordBox, StatusText, RefreshButton |
| Invite dialog | SenderAvatar, TitleText, MessageText, AcceptButton, DeclineButton |
| Avatar | AvatarImage (the picture), FallbackImage (tinted with the color of the name), InitialsText |
| Button | LabelText |
Every widget has designer preview values (category Preview) and a Blueprint event after it updated (On Status Updated, On Friend Updated, On Member Updated, On Server Updated, On Invite Shown, On Avatar Updated).
Project Settings > Pulse > Online UI (UPulseOnlineUISettings) names the default classes; other modules and the HUD bridge create the widgets from there. PartyScreenClass and VoiceIndicatorClass default to the C++ classes (layout in code); AvatarClass and ButtonClass are the avatar and the button those layouts use.
Main menu
With the Pulse frontend of PulseGameplay (bEnableFrontend), PulseOnlineHUDBridge adds to the main menu (bAddMenuEntries of the Online HUD settings, each unless the frontend settings have an entry or panel with its id; turn one off there):
| Id | What | Order |
|---|---|---|
HostParty | Entry Play Together (FPulseFrontendAction_HostPartyGame): the leader, or a player without party, hosts a listen server of the level (Level, else the level of the New Game entry; MaxPlayers 4, Options) for the party with HostPartyGame; members follow, friends that join later follow into the running game. Members see it disabled (“The party leader starts the game”), players that are not logged in “Log in to play together with friends”. | 90 |
Party | Entry Party (FPulseFrontendAction_PartyScreen): opens the party screen in the panel of the menu. | 250 |
Party | Main menu panel: the party panel (PartyPanelClass) beside the entries, while no screen is open. | 0 |
Invites arrive as modal (Accept / Decline) on the main menu and in the game, accepted invites and overlay joins join the party, and a party member follows the leader into his game on its own.
Pulse HUD
The bridge plugin PulseOnlineHUDBridge (PulseOnline + PulseGameplay) shows online events of each local player through the UI host of Pulse Foundation (UPulseOnlineHUDBridgeSubsystem, one per local player; Pulse::UI::GetPresenter), by default the Pulse HUD:
| Event | Shown as |
|---|---|
| Party or game invite received | Modal with Accept / Decline (Invite Mode Modal), or a notification (Toast), or nothing; the modal closes when the invite expires, the back key leaves the invite open |
| Automatic rejoin started | Progress overlay “Connection lost - Reconnecting…” |
| Rejoin finished | Notification “Reconnected”, or a message when it failed |
| Connection lost without rejoin | Message |
| Connection became bad | Warning notification (Warn On Bad Connection) |
| Removed by the server (kick, ban) | Message with the reason of the server; it stays until the player closes it with its button |
| Login failed | Error notification |
| Purchase finished or failed | Notification (cancelled purchases show nothing) |
| Voice chat runs | Speaking indicator in the gameplay part of the HUD (VoiceIndicator: added by code at the left edge unless the layout of the host has its own UPulseOnlineVoiceIndicatorWidget) |
The invite modal has no cancel action: Decline looks like a cancel button, but the back key, a modal closed by code and a UI host that is replaced answer nothing, so the invite stays open in the invite list and is never declined by accident. The reconnect overlay is a progress overlay of the UI host (ShowProgress); the bridge hides it on the presenter that showed it. A modal the host cannot show becomes a notification.
The removed message has no cancel action and no back key either. The client goes back to its entry map right after the removal, so the modal goes with the old map; the bridge remembers the message and shows it again when the UI host of the new map (or another presenter) is ready, until the player closes it with its button.
Notification kinds: Pulse.UI.Notification.Online.Invite, Pulse.UI.Notification.Online.Connection and the kinds Pulse.UI.Notification.Success, Warning and Error of Pulse Foundation. Where they show decides the UI host; with the Pulse HUD, NotificationAreas of the HUD settings maps a kind to an area (parent tags count).
The bridge starts by Activation: With UI Host (default) while a UI host is set up (the Pulse HUD with Enable HUD, or a Presenter Class in Project Settings > Pulse > Foundation > UI). With Always and no Pulse HUD, the default presenter of Pulse Foundation shows invites and messages as modal (its Modal Class) and writes notifications and the reconnect overlay to the log.
Project Settings > Pulse > Online HUD (UPulseOnlineHUDBridgeSettings):
| Setting | Default | Meaning |
|---|---|---|
Activation | WithUIHost | With UI Host, Always or Never. |
InviteMode | Modal | None, Toast or Modal. |
bShowConnectionHints | True | Progress overlay while rejoining, messages when the connection is lost. |
bWarnOnBadConnection | True | Notification when the connection becomes bad. |
bShowRemovedByServer | True | Message when the server removed the player. |
bShowLoginErrors | True | Notification when a login failed. |
bShowPurchases | True | Notifications for finished and failed purchases. |
bAddMenuEntries | True | Play Together, Party and the party panel in the main menu of the Pulse frontend. |
VoiceIndicator | added by code | Placement of the speaking indicator (bAddByCode, WidgetClass, Placement). |
Duration | 6 | Seconds notifications are shown; 0: the default of the UI host. |
| Texts | English defaults | Titles and messages; {Name} is the sender of an invite. |
Trying it out
PulseOnlineShowUI shows all default widgets on the screen of the local player (PulseOnlineShowUI Hide removes them), PulseOnlineHUDTest <Invite|Reconnect|Reconnected|ReconnectFailed|Lost|Bad|Removed> shows the messages of the HUD bridge. With the Mock backend in PIE (listen server + client, both logged in) the host sees the client in the friends list, creates a party with the panel and invites the client; the client gets the invite modal and joins.
CommonUI logs “Cannot create action binding … no action provided” for back handlers (the invite dialog and the modals of the Pulse HUD) when the project’s CommonUI input data has no default back action. Set one in the CommonUI input settings.