Operating System Simulator Plugin
3.5.1
Unreal Engine plugin that simulates an Operating System Environment
|
#include "OperatingSystemProgramSettings.h"
Public Member Functions | |
UOperatingSystemProgramSettings () | |
FORCEINLINE bool | WasWindowMaximized () const |
Gets whether the window was maximized. | |
FORCEINLINE TOptional< FVector2D > | GetLastWindowPosition () const |
Returns the last known window position. | |
Static Public Member Functions | |
static UOperatingSystemProgramSettings * | CreateSettings (const TWeakObjectPtr< UOperatingSystemBaseProgram > OwningProgram, const TSoftClassPtr< UOperatingSystemProgramSettings > &SettingsSoftClass, FGenericError &OutError) |
template<class T > | |
static T * | CreateSettings (const TWeakObjectPtr< UOperatingSystemBaseProgram > OwningProgram, TSoftClassPtr< UOperatingSystemProgramSettings > SettingsSoftClass, FGenericError &OutError) |
static UOperatingSystemProgramSettings * | LoadSettings (const TWeakObjectPtr< UOperatingSystemBaseProgram > OwningProgram) |
static bool | SaveSettings (UOperatingSystemBaseProgram *TargetProgram) |
Protected Member Functions | |
bool | K2_CanSave () const |
void | K2_PreSave () |
Protected Attributes | |
FName | Identifier |
FString | SaveSlotName |
int32 | UserIndex |
TWeakObjectPtr< UOperatingSystemBaseProgram > | ParentProgram |
FVector2D | LastWindowPosition |
uint8 | bWasWindowMaximized: 1 |
uint8 | bHasBlueprintCanSave: 1 |
uint8 | bHasBlueprintPreSave: 1 |
This class represents the settings of an operating system program.
UOperatingSystemProgramSettings is an abstract class that inherits from USaveGame. It provides functionality for creating, loading, and saving program settings. The class contains protected properties for storing program specific settings and debug information It also includes static methods for creating and loading program settings, as well as a blueprint event for determining whether the program can be saved.
UOperatingSystemProgramSettings::UOperatingSystemProgramSettings | ( | ) |
|
static |
Creates a new instance of UOperatingSystemProgramSettings. This method is used to create a new instance of UOperatingSystemProgramSettings with the given parameters. The OwningProgram must have a valid identifier, otherwise an error will be returned. The created UOperatingSystemProgramSettings will have the OwningProgram set as the parent program, the identifier set to the OwningProgram's identifier and the save slot name set.
OwningProgram | The owner UOperatingSystemBaseProgram. |
SettingsSoftClass | The soft reference to the class of UOperatingSystemProgramSettings. |
OutError | The reference to FGenericError for output error messages. |
|
inlinestatic |
|
inline |
Returns the last known window position.
If the last known window position is zero or almost zero, this method will return an empty TOptional<FVector2D> object.
|
protected |
Checks if the program settings can be saved. This function is implemented as a blueprint event, allowing subclasses to override the functionality.
|
protected |
Called to handle pre-saving the OperatingSystemProgramSettings.
This function is an implementable event that can be overridden in Blueprint to perform any necessary operations before the OperatingSystemProgramSettings is saved.
|
static |
Load the settings for the given program.
This function loads the settings for the specified program. It creates an instance of the program's settings class and sets the necessary properties. If the save game file exists, it loads the settings from the file and returns the loaded instance. Otherwise, it returns nullptr.
OwningProgram | The program for which to load the settings. |
|
static |
Saves the settings for the specified operating system program.
TargetProgram | The operating system program whose settings should be saved. |
|
inline |
Gets whether the window was maximized.
This method returns a boolean value indicating whether the window was maximized.
|
protected |
|
protected |
|
protected |
|
protected |
Represents the identifier of an object for debugging purposes.
|
protected |
|
protected |
The ParentProgram property represents the parent program of the OperatingSystemBaseProgram. The parent program can be assigned and accessed through this property.
|
protected |
FString variable is assigned the name of the save slot.
|
protected |
This property represents the User Index used for debug purposes. It is visible only in instances and belongs to the Debug category.