Operating System Simulator Plugin  3.5.1
Unreal Engine plugin that simulates an Operating System Environment
Loading...
Searching...
No Matches
UOperatingSystemSettingModule_Wallpaper Class Reference

#include "OperatingSystemSettingModule_Wallpaper.h"

Inheritance diagram for UOperatingSystemSettingModule_Wallpaper:
[legend]
Collaboration diagram for UOperatingSystemSettingModule_Wallpaper:
[legend]

Public Member Functions

 UOperatingSystemSettingModule_Wallpaper ()
 
OPERATINGSYSTEMSIMULATOR_API void GetDesktopWallpapers (TArray< FString > &OutPaths)
 
OPERATINGSYSTEMSIMULATOR_API void SaveBundledWallpaper (const UTexture2D *BundledWallpaper)
 
OPERATINGSYSTEMSIMULATOR_API void SaveCustomWallpaper (const FString ImagePath)
 
OPERATINGSYSTEMSIMULATOR_API UTexture2D * GetSavedWallpaper () const
 
void SetSavedWallpaper (const bool bIsUsingCustomWallpaper, const FString &Path)
 
- Public Member Functions inherited from UOperatingSystemSettingModule
 UOperatingSystemSettingModule ()
 
void ApplySetting (const FName SettingIdentifier, UObject *Payload=nullptr)
 Apply a setting to the operating system setting module identified by the specified SettingIdentifier.
 
OPERATINGSYSTEMSIMULATOR_API UOperatingSystemGetParentOperatingSystem () const
 Retrieves a pointer to the parent operating system object. It is a constant method, meaning it does not modify the object's state.
 
OPERATINGSYSTEMSIMULATOR_API FORCEINLINE FOperatingSystemSettingModuleInfo GetModuleInfo () const
 Retrieves an FOperatingSystemSettingModuleInfo object containing information about the module.
 

Static Public Member Functions

static OPERATINGSYSTEMSIMULATOR_API FName GetWallpaperChangeEventName ()
 
static TSet< FString > GetImageExtensions ()
 Returns a set of image extensions supported by the operating system setting module.
 
- Static Public Member Functions inherited from UOperatingSystemSettingModule
static UOperatingSystemSettingModuleConstructSettingModule (UOperatingSystem *OwningOS, const FOperatingSystemSettingModuleInfo &Info, const TSoftClassPtr< UOperatingSystemSettingModule > &SettingModuleSoftClass, FGenericError &OutError)
 Constructs a setting module for the operating system.
 

Protected Member Functions

virtual void OnCreated () override
 Performs operations when the object is created. This method is called when the object is created and is responsible for initializing the necessary directories and event listeners.
 
- Protected Member Functions inherited from UOperatingSystemSettingModule
virtual OPERATINGSYSTEMSIMULATOR_API void OnApplySetting (const FName &SettingIdentifier, UObject *Payload)
 Apply a setting to the operating system setting module identified by the specified SettingIdentifier. This method applies a setting to the operating system setting module identified by the specified SettingIdentifier. The SettingIdentifier parameter represents the name of the setting identifier that will be applied. The Payload parameter is an optional payload object associated with the setting. If the Payload parameter is not provided, the setting module itself will be used as the payload.
 
void K2_OnCreated ()
 Blueprint implementable event triggered when an instance of OperatingSystemSettingModule is created.
 
void K2_OnApplySetting (const FName &SettingIdentifier, UObject *Payload)
 Called when a setting is being applied.
 

Additional Inherited Members

- Protected Attributes inherited from UOperatingSystemSettingModule
TSoftClassPtr< UOperatingSystemSettingModuleWidgetWidgetClass
 

Constructor & Destructor Documentation

◆ UOperatingSystemSettingModule_Wallpaper()

UOperatingSystemSettingModule_Wallpaper::UOperatingSystemSettingModule_Wallpaper ( )

Member Function Documentation

◆ GetDesktopWallpapers()

void UOperatingSystemSettingModule_Wallpaper::GetDesktopWallpapers ( TArray< FString > & OutPaths)

Returns an array of image paths from real PC from the below path. C:\Users<USER_NAME>\Documents\YetiTechStudios\OperatingSystemSimulator<OS_NAME>\DesktopWallpapers Each Operating System can have it's own unique images.

Parameters
OutPathsArray of paths that contains images from real PC.
Here is the call graph for this function:

◆ GetImageExtensions()

static TSet< FString > UOperatingSystemSettingModule_Wallpaper::GetImageExtensions ( )
inlinestatic

Returns a set of image extensions supported by the operating system setting module.

Example usage:

TSet<FString> imageExtensions = GetImageExtensions();
static TSet< FString > GetImageExtensions()
Returns a set of image extensions supported by the operating system setting module.
Definition OperatingSystemSettingModule_Wallpaper.h:233
Returns
A set of image extensions, represented as strings. The extensions include "*.png", "*.jpg", "*.jpeg", and "*.bmp".
Here is the caller graph for this function:

◆ GetSavedWallpaper()

UTexture2D * UOperatingSystemSettingModule_Wallpaper::GetSavedWallpaper ( ) const

Returns the saved wallpaper. If saved wallpaper is null, default fallback texture is returned.

Returns
Saved wallpaper or default wallpaper if null.

◆ GetWallpaperChangeEventName()

static OPERATINGSYSTEMSIMULATOR_API FName UOperatingSystemSettingModule_Wallpaper::GetWallpaperChangeEventName ( )
inlinestatic

A helper static function for getting the event when applying wallpaper. You can listen to this event name via device messenger.

Returns
The event name when changing wallpaper.
Here is the caller graph for this function:

◆ OnCreated()

void UOperatingSystemSettingModule_Wallpaper::OnCreated ( )
overrideprotectedvirtual

Performs operations when the object is created. This method is called when the object is created and is responsible for initializing the necessary directories and event listeners.

Note
This method creates the required directories and assumes operating system and device have been set.
The behavior of this method depends on the value of the boolean variable bSaveAutomatically.
See also
UOperatingSystemSettingModule_Wallpaper::GetParentOperatingSystem()
UOperatingSystemSettingModule_Wallpaper::GetWallpaperChangeEventName()

Reimplemented from UOperatingSystemSettingModule.

Here is the call graph for this function:

◆ SaveBundledWallpaper()

void UOperatingSystemSettingModule_Wallpaper::SaveBundledWallpaper ( const UTexture2D * BundledWallpaper)

Saves the given wallpaper as current wallpaper. The texture parameter should point to a valid texture from Content Browser and must be available in cooked game.

Parameters
BundledWallpaperTarget texture from Content Browser.
Here is the call graph for this function:

◆ SaveCustomWallpaper()

void UOperatingSystemSettingModule_Wallpaper::SaveCustomWallpaper ( const FString ImagePath)

Saves the given path as current wallpaper. When Operating System starts it will dynamically load the texture from this path at runtime and use it as wallpaper. If image does not exist in the given path, Default Fallback Texture from this module is used.

Parameters
ImagePathAbsolute path to image texture.
Here is the call graph for this function:

◆ SetSavedWallpaper()

void UOperatingSystemSettingModule_Wallpaper::SetSavedWallpaper ( const bool bIsUsingCustomWallpaper,
const FString & Path )

Sets the saved wallpaper based on the given parameters.

Parameters
bIsUsingCustomWallpaperWhether the custom wallpaper is being used.
PathThe path to the custom wallpaper.
Note
If bIsUsingCustomWallpaper is true, it checks if the file exists at the given Path. If the file exists, it sets the SavedWallpaper to the created texture from the Path. If the file does not exist, it logs a warning message and does not change the SavedWallpaper. If bIsUsingCustomWallpaper is false, it sets the SavedWallpaper to the texture loaded from the SoftObjectPath(Path) synchronously. If SavedWallpaper is null after the above operations, it logs a verbose message, sets SavedWallpaper to the DefaultFallbackTexture, and loads the DefaultFallbackTexture synchronously.
Here is the call graph for this function:

The documentation for this class was generated from the following files: