#include "OperatingSystemSettingModule_Wallpaper.h"
|
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.
|
|
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.
|
|
◆ UOperatingSystemSettingModule_Wallpaper()
UOperatingSystemSettingModule_Wallpaper::UOperatingSystemSettingModule_Wallpaper |
( |
| ) |
|
◆ 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
-
OutPaths | Array of paths that contains images from real PC. |
◆ GetImageExtensions()
static TSet< FString > UOperatingSystemSettingModule_Wallpaper::GetImageExtensions |
( |
| ) |
|
|
inlinestatic |
Returns a set of image extensions supported by the operating system setting module.
Example usage:
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".
◆ 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.
◆ OnCreated()
void UOperatingSystemSettingModule_Wallpaper::OnCreated |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ 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
-
BundledWallpaper | Target texture from Content Browser. |
◆ 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
-
ImagePath | Absolute path to image texture. |
◆ SetSavedWallpaper()
void UOperatingSystemSettingModule_Wallpaper::SetSavedWallpaper |
( |
const bool | bIsUsingCustomWallpaper, |
|
|
const FString & | Path ) |
Sets the saved wallpaper based on the given parameters.
- Parameters
-
bIsUsingCustomWallpaper | Whether the custom wallpaper is being used. |
Path | The 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.
The documentation for this class was generated from the following files: