Widget Studio
UWidgetStudioButtonGroup Class Reference

A utility widget to group buttons and their logic together. More...

#include <WSButtonGroup.h>

Inheritance diagram for UWidgetStudioButtonGroup:
UWidgetStudioBase

Public Member Functions

int32 GetCurrentIndex () const
 Returns the index of the last button to be selected.
 
TArray< UWidgetStudioButtonBase * > GetButtons () const
 Returns all of the buttons managed by the Button Group.
 
UWidgetStudioButtonBaseGetButtonAtIndex (int32 Index)
 Returns the button at the given index. More...
 
UWidgetStudioButtonBaseGetCurrentButton ()
 Returns the button at the current index.
 
int32 GetButtonCount () const
 Returns the number of buttons contained within the Button Group.
 
EClusivity GetSelectionMethod () const
 Returns the current selection method.
 
void AddButton (UWidgetStudioButtonBase *NewButton)
 Add a button to the Button Group. More...
 
bool RemoveButton (UWidgetStudioButtonBase *ButtonToRemove)
 Remove a button from the Button Group. More...
 
void RemoveButtonAtIndex (int32 Index)
 Remove button at given index. More...
 
void RemoveAllButtons ()
 Removes all buttons from Button Group.
 
void SetCurrentIndex (int32 Index, bool bBroadcast=true)
 Set the currently selected button. More...
 
void SetSelectionMethod (EClusivity NewMethod)
 Set the currently selected button. 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.
 

Public Attributes

FWSButtonGroupDelegate OnCurrentIndexChanged
 
FWSButtonGroupChangedDelegate OnButtonsChanged
 
- 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...
 

Protected Member Functions

void OnButtonPressed (UWidgetStudioButtonBase *Button)
 
void UpdateCurrentIndex ()
 
void UpdateButtonCheckedStates ()
 
- Protected Member Functions inherited from UWidgetStudioBase
virtual void InitializeStyling ()
 
virtual void UpdateStyling ()
 
virtual void NativeOnMouseEnter (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 
virtual void NativeOnMouseLeave (const FPointerEvent &InMouseEvent) override
 
virtual void NativeOnMouseCaptureLost (const FCaptureLostEvent &CaptureLostEvent) override
 

Detailed Description

A utility widget to group buttons and their logic together.

Member Function Documentation

◆ AddButton()

void UWidgetStudioButtonGroup::AddButton ( UWidgetStudioButtonBase NewButton)

Add a button to the Button Group.

Parameters
NewButtonThe button to add to the button group.

◆ GetButtonAtIndex()

UWidgetStudioButtonBase * UWidgetStudioButtonGroup::GetButtonAtIndex ( int32  Index)

Returns the button at the given index.

Parameters
IndexThe index to find the button at.

◆ RemoveButton()

bool UWidgetStudioButtonGroup::RemoveButton ( UWidgetStudioButtonBase ButtonToRemove)

Remove a button from the Button Group.

Parameters
ButtonToRemoveThe button to remove from the button group.

◆ RemoveButtonAtIndex()

void UWidgetStudioButtonGroup::RemoveButtonAtIndex ( int32  Index)

Remove button at given index.

Parameters
IndexThe index to remove the button from.

◆ SetCurrentIndex()

void UWidgetStudioButtonGroup::SetCurrentIndex ( int32  Index,
bool  bBroadcast = true 
)

Set the currently selected button.

Parameters
IndexThe index to set the button group to.
bBroadcastEnable to dispatch the OnCurrentIndexChanged event

◆ SetSelectionMethod()

void UWidgetStudioButtonGroup::SetSelectionMethod ( EClusivity  NewMethod)

Set the currently selected button.

Parameters
NewMethodThe method to change the button group to.

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