FPlatformOverlay
Applies that policy to the online-service seam's overlay notification.
- Module
- Game
- Header
#include "Game/PlatformOverlay.h"- Namespace
Mowo
Every effect goes through an injected hook. The pause target is not the same object in a packaged runtime and in a PIE session, and the part that can actually be wrong is the state machine — it has to survive a repeated open, a close with no matching open, and a close after the player paused the game themselves, without ever restoring state the game has since taken over.
Type aliases
| Alias | Description |
|---|---|
using FBoolQuery = std::function<bool()> | |
using FBoolSink = std::function<void(bool)> | |
using FFloatQuery = std::function<float()> | |
using FFloatSink = std::function<void(float)> |
Constructors
| Signature | Name | Description |
|---|---|---|
FPlatformOverlay(const FPlatformOverlay&) = delete | FPlatformOverlay |
Public functions
| Returns | Name | Description |
|---|---|---|
FPlatformOverlay& | Get | |
FPlatformOverlay& | operator= | |
void | Install | Binds the handler to FOnlineServices and installs the default hooks (FTime pause, InputManager cursor, AudioEngine master volume) for any hook the host has not already replaced. |
bool | IsInstalled | |
void | SetPolicy | |
const FPlatformOverlayPolicy& | GetPolicy | |
void | SetPauseHooks | |
void | SetMouseCaptureHooks | |
void | SetAudioHooks | |
void | SetMultiplayerQuery | True while the session has remote peers. |
void | OnOverlayActivated | The transition. |
bool | IsOverlayActive | |
bool | DidPauseWorld | What the handler is currently holding, so a host (and the self-test) can tell an overlay-driven pause from a game-driven one. |
bool | DidReleaseMouse | |
bool | DidChangeAudio | |
float | GetRestoreVolume | |
void | Reset | Drops every hook and clears the held state without restoring it — for a test that wants a clean handler, and for a host tearing its world down under an open overlay. |
Function details
FPlatformOverlay
FPlatformOverlay(const FPlatformOverlay&) = deleteGet
static FPlatformOverlay& Get()operator=
FPlatformOverlay& operator=(const FPlatformOverlay&) = deleteInstall
void Install()Binds the handler to FOnlineServices and installs the default hooks (FTime pause, InputManager cursor, AudioEngine master volume) for any hook the host has not already replaced. Safe with no platform up: the seam's default is a no-op and nothing ever fires.
IsInstalled
bool IsInstalled() constSetPolicy
void SetPolicy(const FPlatformOverlayPolicy& policy)GetPolicy
const FPlatformOverlayPolicy& GetPolicy() constSetPauseHooks
void SetPauseHooks(FBoolQuery isPaused, FBoolSink setPaused)SetMouseCaptureHooks
void SetMouseCaptureHooks(FBoolQuery isCaptured, FBoolSink setCaptured)SetAudioHooks
void SetAudioHooks(FFloatQuery getMasterVolume, FFloatSink setMasterVolume)SetMultiplayerQuery
void SetMultiplayerQuery(FBoolQuery isMultiplayer)True while the session has remote peers. A networked world keeps running with the overlay up — the other players are still in it and there is no pause to hand them.
OnOverlayActivated
void OnOverlayActivated(bool active)The transition. Idempotent per edge: a second true changes nothing, and a false with no open before it restores nothing.
IsOverlayActive
bool IsOverlayActive() constDidPauseWorld
bool DidPauseWorld() constWhat the handler is currently holding, so a host (and the self-test) can tell an overlay-driven pause from a game-driven one.
DidReleaseMouse
bool DidReleaseMouse() constDidChangeAudio
bool DidChangeAudio() constGetRestoreVolume
float GetRestoreVolume() constReset
void Reset()Drops every hook and clears the held state without restoring it — for a test that wants a clean handler, and for a host tearing its world down under an open overlay.