Widget Studio
UWidgetStudioSubsystem Class Referencefinal

A singleton for managing widget styles and managing widget state instantiates when the plugin loads. More...

#include <WSSubsystem.h>

Inheritance diagram for UWidgetStudioSubsystem:

Public Member Functions

UWidgetStudioThemeGetTheme ()
 Make sure current Theme DataAsset is loaded and valid, then retrieve it. More...
 
UWidgetStudioIconSetGetIconSet ()
 Make sure current IconSet DataAsset is loaded and valid, then retrieve it. More...
 
UWidgetStudioTypographyGetTypography ()
 Make sure current Typography DataAsset is loaded and valid, then retrieve it. More...
 
bool SetTheme (TSoftObjectPtr< UWidgetStudioTheme > InTheme)
 Sets the theme (colors) for widgets – checks to make sure the incoming Theme is valid and loaded, then updates the current Theme, including the "Theme" value in the .ini file. More...
 
bool SetIconSet (TSoftObjectPtr< UWidgetStudioIconSet > InIconStyle)
 Sets the IconStyle for widgets – checks to make sure the incoming IconSet is valid and loaded, then updates the current IconSet, including the "IconSet" value in the .ini file. More...
 
bool SetTypography (TSoftObjectPtr< UWidgetStudioTypography > InTypography)
 Sets the typography (font settings) for widgets – checks to make sure the incoming Typography is valid and loaded, then updates the current Typography, including the "Typography" value in the .ini file. More...
 
bool SetBorderRadius (int32 InRadius)
 Sets the border radius for widgets – updates BorderRadius, oncluding "BorderRadius" value in the .ini file. More...
 
bool SetControlDimensions (FVector2D InDimensions)
 Sets the control dimensions for widgets – updates ControlDimensions, oncluding "ControlDimensions" value in the .ini file. More...
 
bool IsPluginInitialized () const
 
virtual void Initialize (FSubsystemCollectionBase &Collection) override
 
virtual void Deinitialize () override
 

Static Public Member Functions

static int32 GetBorderRadius ()
 Get current border radius value. More...
 
static FVector2D GetControlDimensions ()
 Get current control dimensions x and y values as FVector2D. More...
 
static UWidgetStudioSubsystemGetInstance ()
 Get WidgetStudioSingleton instance. More...
 

Public Attributes

TSoftObjectPtr< UWidgetStudioThemeTheme
 
TSoftObjectPtr< UWidgetStudioTypographyTypography
 
TSoftObjectPtr< UWidgetStudioIconSetIconSet
 
int32 BorderRadius = DefaultBorderRadius
 
float IdealWidth = DefaultIdealWidth
 
float IdealHeight = DefaultIdealHeight
 
FStyleDelegate OnStyleChanged
 
FStartInitDelegate OnPluginStartedInit
 
FEndInitDelegate OnPluginFinishedInit
 

Friends

class UWidgetStudioTestClass
 

Detailed Description

A singleton for managing widget styles and managing widget state instantiates when the plugin loads.

Member Function Documentation

◆ GetBorderRadius()

int32 UWidgetStudioSubsystem::GetBorderRadius ( )
static

Get current border radius value.

Returns
BorderRadius

◆ GetControlDimensions()

FVector2D UWidgetStudioSubsystem::GetControlDimensions ( )
static

Get current control dimensions x and y values as FVector2D.

Returns
ControlDimensions

◆ GetIconSet()

UWidgetStudioIconSet * UWidgetStudioSubsystem::GetIconSet ( )

Make sure current IconSet DataAsset is loaded and valid, then retrieve it.

Returns
the UWidgetStudioIconSet*

◆ GetInstance()

UWidgetStudioSubsystem * UWidgetStudioSubsystem::GetInstance ( )
static

Get WidgetStudioSingleton instance.

Create if non-existent.

Returns
the instance

◆ GetTheme()

UWidgetStudioTheme * UWidgetStudioSubsystem::GetTheme ( )

Make sure current Theme DataAsset is loaded and valid, then retrieve it.

Returns
the UWidgetStudioTheme*

◆ GetTypography()

UWidgetStudioTypography * UWidgetStudioSubsystem::GetTypography ( )

Make sure current Typography DataAsset is loaded and valid, then retrieve it.

Returns
the UWidgetStudioTypography*

◆ SetBorderRadius()

bool UWidgetStudioSubsystem::SetBorderRadius ( int32  InRadius)

Sets the border radius for widgets – updates BorderRadius, oncluding "BorderRadius" value in the .ini file.

Broadcasts OnStyleChanged() event.

Parameters
InRadius
Returns
true if border radius is successfully set, false otherwise

◆ SetControlDimensions()

bool UWidgetStudioSubsystem::SetControlDimensions ( FVector2D  InDimensions)

Sets the control dimensions for widgets – updates ControlDimensions, oncluding "ControlDimensions" value in the .ini file.

Broadcasts OnStyleChanged() event.

Parameters
InDimensions
Returns
true if control dimensions are successfully set, false otherwise

◆ SetIconSet()

bool UWidgetStudioSubsystem::SetIconSet ( TSoftObjectPtr< UWidgetStudioIconSet InIconStyle)

Sets the IconStyle for widgets – checks to make sure the incoming IconSet is valid and loaded, then updates the current IconSet, including the "IconSet" value in the .ini file.

Broadcasts OnStyleChanged() event.

Precondition
IconSet passed in must point to a valid data asset
Postcondition
Passed in IconSet data asset will be loaded (if not already) and applied as the global icon set
OnStyleChanged event will be broadcast, so Editor module WS Settings are updated
Parameters
InIconSet- the IconSet to set
Returns
true if IconSet is successfully set, false otherwise

◆ SetTheme()

bool UWidgetStudioSubsystem::SetTheme ( TSoftObjectPtr< UWidgetStudioTheme InTheme)

Sets the theme (colors) for widgets – checks to make sure the incoming Theme is valid and loaded, then updates the current Theme, including the "Theme" value in the .ini file.

Broadcasts OnStyleChanged() event.

Precondition
Theme passed in must point to a valid data asset
Postcondition
Passed in Theme data asset will be loaded (if not already) and applied as the global theme
OnStyleChanged event will be broadcast, so Editor module WS Settings are updated
Parameters
InTheme- the Theme to set
Returns
true if Theme is successfully set, false otherwise

◆ SetTypography()

bool UWidgetStudioSubsystem::SetTypography ( TSoftObjectPtr< UWidgetStudioTypography InTypography)

Sets the typography (font settings) for widgets – checks to make sure the incoming Typography is valid and loaded, then updates the current Typography, including the "Typography" value in the .ini file.

Broadcasts OnStyleChanged() event.

Precondition
Typography passed in must point to a valid data asset
Postcondition
Passed in Typography data asset will be loaded (if not already) and applied as the global typography
OnStyleChanged event will be broadcast, so Editor module WS Settings are updated
Parameters
InTypography- the Typography to set
Returns
true if Typography is successfully set, false otherwise

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