Widget Studio
UWidgetStudioIcon Class Reference

A pre-setup widget that works with power of two icons. More...

#include <WSIcon.h>

Inheritance diagram for UWidgetStudioIcon:
UWidgetStudioBase

Public Member Functions

EIconItem GetIcon () const
 Returns the icon used from the icon library.
 
EPalette GetColor () const
 Returns the color used for the icon.
 
bool IsUsingCustomIcon () const
 Returns true if a custom icon has been set and is being used.
 
UTexture2D * GetCustomIcon () const
 Returns the custom icon.
 
float GetSize () const
 Returns the size of the icon.
 
float IsUsingNativeColor () const
 Returns true if the icon is using it's native color. More...
 
void SetIcon (EIconItem NewIcon)
 Sets the icon to use an icon from the Icon Set. More...
 
void SetColor (EPalette NewColor)
 Sets the color of the icon. More...
 
void SetCustomIcon (UTexture2D *NewCustomIcon)
 Sets the icon to use a custom icon. More...
 
void ClearCustomIcon ()
 Clears the set custom icon and automatically switches the widget to use the icon library.
 
void SetSize (float NewSize)
 Sets the size of the icon. More...
 
void SetUseNativeColor (bool NewState)
 Set to true to use the icons native color. More...
 
void SetIconStyle (const FWSIconStyle &NewOptions)
 Set the icon styling. More...
 
- Public Member Functions inherited from UWidgetStudioBase
FVector2D GetDimensions () const
 Returns the current X and Y dimensions of the Widget. More...
 
int32 GetBorderRadius () const
 Returns the current border radius of the Widget. More...
 
void ForceStyleUpdate ()
 Refresh the dynamic styling of the Widget Studio widget.
 
void SetSizeModifier (ESizeModifier InSizeModifier)
 Set the size modifier of the Widget Studio widget.
 

Protected Member Functions

virtual TSharedRef< SWidget > RebuildWidget () override
 
virtual int32 NativePaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
 
virtual void SynchronizeProperties () override
 
virtual void InitializeStyling () override
 
virtual void UpdateStyling () override
 
- Protected Member Functions inherited from UWidgetStudioBase
virtual void NativeOnMouseEnter (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 
virtual void NativeOnMouseLeave (const FPointerEvent &InMouseEvent) override
 
virtual void NativeOnMouseCaptureLost (const FCaptureLostEvent &CaptureLostEvent) override
 

Protected Attributes

UInvalidationBox * Retainer = nullptr
 
USizeBox * SizeBox = nullptr
 
UScaleBox * ScaleBox = nullptr
 
UImage * IconItem = nullptr
 

Additional Inherited Members

- Public Attributes inherited from UWidgetStudioBase
FWSBaseHoverStateDelegate OnHoverStateChanged
 Called when the hover state has been changed.
 
bool bCanOverrideDimensions = true
 Used to enable or disable dimension override's.
 
bool bCanOverrideBorderRadius = true
 Used to enable or disable dimension override's.
 
FVector2D MinimumDimensions = FVector2D(50, 7)
 The minimum dimensions of the widget. More...
 
bool bDisablePainting = false
 Used for debugging. More...
 
float AnimationTime = 7
 The animation interpolation speed. More...
 
ESizeModifier SizeModifier = ESizeModifier::Regular
 Quickly modify the overall size of the widget. More...
 
FVector2D OverrideDimensions = FVector2D(0, 0)
 Manually adjust the X and Y dimensions of the widget. More...
 
int32 OverrideBorderRadius = -1
 Manually adjust the border radius of the widget. More...
 

Detailed Description

A pre-setup widget that works with power of two icons.

For example, 64x64.

Member Function Documentation

◆ InitializeStyling()

void UWidgetStudioIcon::InitializeStyling ( )
overrideprotectedvirtual

Reimplemented from UWidgetStudioBase.

◆ IsUsingNativeColor()

float UWidgetStudioIcon::IsUsingNativeColor ( ) const

Returns true if the icon is using it's native color.

False if using the palette color.

◆ SetColor()

void UWidgetStudioIcon::SetColor ( EPalette  NewColor)

Sets the color of the icon.

Parameters
NewColorThe color to apply to the icon widget.

◆ SetCustomIcon()

void UWidgetStudioIcon::SetCustomIcon ( UTexture2D *  NewCustomIcon)

Sets the icon to use a custom icon.

Parameters
NewCustomIconThe texture2D icon to apply to the icon widget.

◆ SetIcon()

void UWidgetStudioIcon::SetIcon ( EIconItem  NewIcon)

Sets the icon to use an icon from the Icon Set.

Parameters
NewIconThe icon to apply to the icon widget.

◆ SetIconStyle()

void UWidgetStudioIcon::SetIconStyle ( const FWSIconStyle NewOptions)

Set the icon styling.

Parameters
NewOptionsThe new icon styling to apply.

◆ SetSize()

void UWidgetStudioIcon::SetSize ( float  NewSize)

Sets the size of the icon.

Parameters
NewSizeThe size to apply to the icon widget.

◆ SetUseNativeColor()

void UWidgetStudioIcon::SetUseNativeColor ( bool  NewState)

Set to true to use the icons native color.

Set to false to use the palette color.

Parameters
NewStateThe state to apply to use the icons own color (true), or to use the palette color (false).

◆ UpdateStyling()

void UWidgetStudioIcon::UpdateStyling ( )
overrideprotectedvirtual

Reimplemented from UWidgetStudioBase.


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