Skip to content

UOperatingSystemSettingModule_Theme

#include <OperatingSystemSimulator/Public/Programs/Settings/Modules/OperatingSystemSettingModule_Theme.h>
class UOperatingSystemSettingModule_Theme

Defined in OperatingSystemSettingModule_Theme.h:13

Inherits: UOperatingSystemSettingModule

---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemSettingModule_Theme["UOperatingSystemSettingModule_Theme"]
  class UOperatingSystemSettingModule["UOperatingSystemSettingModule"]
  UOperatingSystemSettingModule <|-- UOperatingSystemSettingModule_Theme
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemSettingModule_Theme["UOperatingSystemSettingModule_Theme"]
  class EOperatingSystemTheme["EOperatingSystemTheme"]
  UOperatingSystemSettingModule_Theme ..> EOperatingSystemTheme
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemSettingModule_Theme {
    +UOperatingSystemSettingModule_Theme()
    +SetTheme(const EOperatingSystemTheme NewTheme)
    +GetPrimaryThemeColor(const bool bInvert=false) const FLinearColor
    +GetSecondaryThemeColor(const bool bInvert=false) const FLinearColor
    +GetPrimaryAccentColor(const bool bInvert=false) const FLinearColor
    +GetSecondaryAccentColor(const bool bInvert=false) const FLinearColor
    +FindColorByName(const FName Name, FLinearColor &OutColor) c bool
    +IsDarkTheme() const bool
    +GetThemeChangeEventName() FName
    +Colors : TMap< FName, FLinearColor >
    +CurrentTheme : EOperatingSystemTheme()
  }

UOperatingSystemSettingModule_Theme is a subclass of UOperatingSystemSettingModule that provides functionality for managing and retrieving theme-related settings.

ReturnNameDescription
UOperatingSystemSettingModule_Theme
voidSetThemeSets the current theme.
FLinearColorGetPrimaryThemeColor constReturns the primary theme color.
FLinearColorGetSecondaryThemeColor constReturns the secondary theme color.
FLinearColorGetPrimaryAccentColor constReturns the primary accent color.
FLinearColorGetSecondaryAccentColor constReturns the secondary accent color.
boolFindColorByName constGets the color by name from the Colors TMap. This is particularly useful if you added your own custom colors.
boolIsDarkTheme const inlineChecks if the current theme is dark or not. If this function returns false, it means current theme is light.

UOperatingSystemSettingModule_Theme()

Defined in OperatingSystemSettingModule_Theme.h:38


void SetTheme(const EOperatingSystemTheme NewTheme)

Defined in OperatingSystemSettingModule_Theme.h:55 Sets the current theme.

  • NewTheme New theme to set.

const

FLinearColor GetPrimaryThemeColor(const bool bInvert = false) const

Defined in OperatingSystemSettingModule_Theme.h:64 Returns the primary theme color.

  • bInvert Get color of inverted theme. If current theme is dark, this will return color for light theme.

Primary color of the current theme as defined in Colors parameter.


const

FLinearColor GetSecondaryThemeColor(const bool bInvert = false) const

Defined in OperatingSystemSettingModule_Theme.h:73 Returns the secondary theme color.

  • bInvert Get color of inverted theme. If current theme is dark, this will return color for light theme.

Secondary color of the current theme as defined in Colors parameter.


const

FLinearColor GetPrimaryAccentColor(const bool bInvert = false) const

Defined in OperatingSystemSettingModule_Theme.h:82 Returns the primary accent color.

  • bInvert Get color of inverted theme. If current theme is dark, this will return color for light theme.

Primary accent color of the current theme as defined in Colors parameter.


const

FLinearColor GetSecondaryAccentColor(const bool bInvert = false) const

Defined in OperatingSystemSettingModule_Theme.h:91 Returns the secondary accent color.

  • bInvert Get color of inverted theme. If current theme is dark, this will return color for light theme.

Secondary accent color of the current theme as defined in Colors parameter.


const

bool FindColorByName(const FName Name, FLinearColor & OutColor) const

Defined in OperatingSystemSettingModule_Theme.h:102 Gets the color by name from the Colors TMap. This is particularly useful if you added your own custom colors.

  • Name Name of the color to find.

  • OutColor Outputs the color or Black if invalid.

True if the given color name was found in Colors Map.


const inline

inline bool IsDarkTheme() const

Defined in OperatingSystemSettingModule_Theme.h:110 Checks if the current theme is dark or not. If this function returns false, it means current theme is light.

True if the current theme is dark.

  • Dark
ReturnNameDescription
FNameGetThemeChangeEventName static inlineA helper static function for getting the event when changing themes. You can listen to this event name via device messenger.

static inline

static inline FName GetThemeChangeEventName()

Defined in OperatingSystemSettingModule_Theme.h:47 A helper static function for getting the event when changing themes. You can listen to this event name via device messenger.

The event name when changing theme.

ReturnNameDescription
TMap< FName, FLinearColor >ColorsColors is a TMap variable that stores a collection of FName keys mapped to FLinearColor values. These colors are used to define the theme-related settings in the operating system.
EOperatingSystemThemeCurrentThemeCurrentTheme is a variable of type EOperatingSystemTheme that represents the current theme in the operating system. The theme can be either light or dark, as defined in the enum EOperatingSystemTheme. By default, the theme is set to EOperatingSystemTheme::Light.

TMap< FName, FLinearColor > Colors

Defined in OperatingSystemSettingModule_Theme.h:24 Colors is a TMap variable that stores a collection of FName keys mapped to FLinearColor values. These colors are used to define the theme-related settings in the operating system.

The keys in Colors represent the names of the colors, and the values represent the actual color values.


EOperatingSystemTheme CurrentTheme

Defined in OperatingSystemSettingModule_Theme.h:34 CurrentTheme is a variable of type EOperatingSystemTheme that represents the current theme in the operating system. The theme can be either light or dark, as defined in the enum EOperatingSystemTheme. By default, the theme is set to EOperatingSystemTheme::Light.

To change the current theme, use the SetTheme function.