Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/UMG/Public/Components/Button.h |
Include |
#include "Components/Button.h" |
class UButton : public UContentWidget
The button is a click-able primitive widget to enable basic interaction, you can place any other widget inside a button to make a more complex and interesting click-able element in your UI.
Single Child Clickable
Name | Description | ||
---|---|---|---|
|
BackgroundColor |
The color multiplier for the button background |
|
|
TEnumAsByte< EB... |
ClickMethod |
The type of mouse action required by the user to trigger the buttons 'Click' |
|
ColorAndOpacity |
The color multiplier for the button content |
|
|
IsFocusable |
Sometimes a button should only be mouse-clickable and never keyboard focusable. |
|
|
TSharedPtr< SBu... |
MyButton |
Cached pointer to the underlying slate button owned by this UWidget |
|
OnClicked |
Called when the button is clicked |
|
|
OnHovered |
||
|
OnPressed |
Called when the button is pressed |
|
|
OnReleased |
Called when the button is released |
|
|
OnUnhovered |
||
|
TEnumAsByte< EB... |
PressMethod |
The type of keyboard/gamepad button press action required by the user to trigger the buttons 'Click' |
|
TEnumAsByte< EB... |
TouchMethod |
The type of touch action required by the user to trigger the buttons 'Click' |
|
WidgetStyle |
The button style used at runtime |
Name | Description | |
---|---|---|
|
UButton ( |
Name | Description | ||
---|---|---|---|
|
IsPressed() |
Returns true if the user is actively pressing the button. |
|
|
SetBackgroundColor ( |
Sets the color multiplier for the button background |
|
|
SetClickMethod ( |
||
|
SetColorAndOpacity ( |
Sets the color multiplier for the button content |
|
|
SetPressMethod ( |
||
|
SetStyle ( |
Sets the color multiplier for the button background |
|
|
SetTouchMethod ( |
||
|
SlateHandleClicked() |
Handle the actual click event from slate and forward it on |
|
|
SlateHandleHovered() |
||
|
SlateHandlePressed() |
||
|
SlateHandleReleased() |
||
|
SlateHandleUnhovered() |
Name | Description | ||
---|---|---|---|
|
UClass * |
GetSlotClass() |
|
|
OnSlotAdded ( |
||
|
OnSlotRemoved ( |
Name | Description | ||
---|---|---|---|
|
TSharedPtr< ... |
GetAccessibleWidget() |
Gets the widget that accessibility properties should synchronize to. |
|
const FText |
GetPaletteCategory() |
Gets the palette category of the widget |
|
TSharedRef< ... |
RebuildDesignWidget ( |
|
|
TSharedRef< ... |
RebuildWidget() |
Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. |
|
SynchronizeProperties() |
Applies all properties to the native widget if possible. |
Name | Description | ||
---|---|---|---|
|
ReleaseSlateResources ( |
Name | Description | ||
---|---|---|---|
|
PostLoad() |
Begin UObject. |
Name | Description | ||
---|---|---|---|
|
TObjectPtr< USl... |
Style_DEPRECATED |
The template style asset, used to seed the mutable instance of the style. |