How-To: Live Preview, Confirmation & Restart
Goal: give the Apply/Cancel flow AAA behavior - preview changes before committing, keep/revert dialogs for risky settings, and a restart banner.
UCrimsonSettingScreen subclass (Quick Start step 4). All three are optional.Live preview
With live preview on, slider/option changes update the UI immediately but do not commit until Apply; Cancel discards them. It works automatically for the _BP value classes (which the data asset creates).
Images/CrimsonSettings/howto-preview-toggle.pngConfirmation countdown
Mark a risky setting (resolution, display mode) with Requires Confirmation (and optional Confirmation Timeout Seconds, default 15) in the data asset. On Apply the change goes live, then the screen fires K2_OnConfirmationRequired(TimeoutSeconds); call ConfirmSettingChange() on Keep or RevertSettingChange() on Revert / timeout.
| Hook | When |
|---|---|
K2_OnConfirmationRequired(Timeout) | Fired after Apply when a confirmation-required setting was applied - show the keep/revert countdown UI. |
ConfirmSettingChange() | Player pressed Keep - locks in the value. |
RevertSettingChange() | Player pressed Revert, or your timer expired - restores the previous value. |
Restart required
Mark a setting Requires Restart in the data asset. When such a setting is applied, the screen fires K2_OnRestartRequired() - override it to show a restart banner.
UCrimsonSettingRegistryChangeTracker: ApplyChanges() commits every dirty setting; the screen's CancelChanges() reverts them via the tracker's RestoreToInitial() on each dirty setting (discarding preview values).