ULimenResolutionSetting
Overview
ULimenResolutionSetting is a subclass of ULimenSelectionSetting and implements FTickableGameObject. It manages the display resolution, ensuring that users are prompted to confirm their choice before applying it. The class handles resolution changes, updates, and provides a modal confirmation dialog.
Properties
Type | Name | Access | Description |
|---|---|---|---|
bool | bIsResolutionChangeConfirmed | Private | Tracks whether the user has confirmed the resolution change. |
bool | bShouldTick | Private | Indicates if the object should be ticked. |
float | CurrentTime | Private | Counts down the time until the resolution is automatically reverted. |
FString | CurrentWindowModeSetting | Private | Stores the current window mode setting. |
FString | LastWindowModeSetting | Private | Stores the last known window mode setting. |
TWeakObjectPtr< ULimenGenericModalWidget > | ModalWidget | Private | Weak pointer to the modal widget used for confirmation. |
Functions
Return Type | Signature | Description |
|---|---|---|
void | SubsystemInitialized(ULimenModularSettingsSubsystem* ModularSettingsSubsystem) | Initializes the subsystem and sets up event bindings. |
bool | CanEdit() const | Determines if the setting can be edited based on the current window mode. |
void | Tick(float DeltaTime) | Ticks the object, updating the modal widget or reverting the resolution change. |
ETickableTickType | GetTickableTickType() const | Returns the tick type for the object. |
bool | IsTickable() const | Determines if the object should be ticked. |
TStatId | GetStatId() const | Returns the stat ID for performance monitoring. |
bool | IsTickableWhenPaused() const | Indicates that the object can be ticked when paused. |
bool | IsTickableInEditor() const | Indicates that the object cannot be ticked in the editor. |
UWorld* | GetTickableGameObjectWorld() const | Returns the world associated with the tickable game object. |
void | ApplyCurrentSetting(const bool bUserRequest) | Applies the current setting, optionally showing a confirmation modal. |
void | SetDefaults() | Sets default values and possible selections based on available resolutions. |
FString | FormatResolution(const FScreenResolutionRHI& InResolution) | Formats a screen resolution to a string. |
FString | FormatResolution(const uint32 Width, const uint32 Height) | Formats a screen resolution from width and height to a string. |
FIntPoint | DeFormatResolution(const FString& InResolutionString) | Parses a resolution string back to an |
void | OnWindowModeUpdated(const ULimenSetting* Setting) | Handles updates to the window mode setting, resetting the default value if necessary. |
void | OnMonitorDisplayUpdated(const ULimenSetting* Setting) | Updates possible selections based on available screen resolutions. |
void | ResolutionConfirmationReceived(ULimenGenericModalWidget* ULimenGenericModalWidget, const bool bConfirmed) | Handles the user's response to the resolution confirmation modal. |
FString | FormatModalText(const int32 SecondsRemaining) | Formats the text for the modal dialog with remaining time. |
Usage & Implementation Notes
Threading Constraints: The object is tickable and can be ticked when paused, but not in the editor.
Replication Requirements: None explicitly mentioned.
Memory Lifetime Management: Uses a weak pointer to manage the lifetime of the modal widget.
Initialization Dependencies: Depends on
ULimenModularSettingsSubsystemfor initialization and event bindings.