Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/Widgets > API/Runtime/Slate/Widgets/Input
Inheritance Hierarchy
- FSlateControlledConstruction
- TSharedFromThis
- SWidget
- SCompoundWidget
- SBorder
- SButton
- SButtonCommandWidget
- SHyperlink
- SRichTextHyperlink
- SHyperlinkWithTextHighlight
- SPrimaryButton
- SSimpleButton
References
Module | Slate |
Header | /Engine/Source/Runtime/Slate/Public/Widgets/Input/SButton.h |
Include | #include "Widgets/Input/SButton.h" |
Syntax
class SButton : public SBorder
Remarks
Slate's Buttons are clickable Widgets that can contain arbitrary widgets as its Content().
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
SButton () |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Construct
(
const FArguments& InArgs |
Construct this widget |
![]() |
void | ExecuteHoverStateChanged
(
bool bPlaySound |
|
![]() |
FReply | Execute the "OnClicked" delegate, and get the reply | |
![]() ![]() |
TSlateAttributeRef< bool > | ||
![]() ![]() |
TSlateAttributeRef< FSlateColor > | ||
![]() ![]() |
TEnumAsByte< EButtonClickMethod::Type > | GetClickMethodFromInputType
(
const FPointerEvent& MouseEvent |
Utility function to translate other input click methods to regular ones. |
![]() ![]() |
FMargin | ||
![]() ![]() |
TSlateAttributeRef< FMargin > | ||
![]() ![]() |
bool | ||
![]() ![]() |
bool | IsPreciseTapOrClick
(
const FPointerEvent& MouseEvent |
Utility function to determine if the incoming mouse event is for a precise tap or click |
![]() ![]() |
bool | IsPressed () |
Returns true if this button is currently pressed |
![]() ![]() |
void | Play the hovered sound | |
![]() ![]() |
void | Play the pressed sound | |
![]() ![]() |
void | Press () |
Press the button |
![]() ![]() |
void | Release () |
Release the button |
![]() |
void | SetAppearPressed
(
TAttribute< bool > InValue |
Set the AppearPressed look. |
![]() |
void | SetButtonStyle
(
const FButtonStyle* ButtonStyle |
See ButtonStyle attribute |
![]() |
void | SetClickMethod
(
EButtonClickMethod::Type InClickMethod |
|
![]() |
void | SetContentPadding
(
TAttribute< FMargin > InContentPadding |
See ContentPadding attribute |
![]() |
void | SetHoveredSound
(
TOptional< FSlateSound > InHoveredSound |
See HoveredSound attribute |
![]() |
void | SetIsFocusable
(
bool bInIsFocusable |
Set if this button can be focused |
![]() |
void | SetOnClicked
(
FOnClicked InOnClicked |
See OnClicked event |
![]() |
void | SetOnHovered
(
FSimpleDelegate InOnHovered |
Set OnHovered event |
![]() |
void | SetOnUnhovered
(
FSimpleDelegate InOnUnhovered |
Set OnUnhovered event |
![]() |
void | SetPressedSound
(
TOptional< FSlateSound > InPressedSound |
See PressedSound attribute |
![]() |
void | SetPressMethod
(
EButtonPressMethod::Type InPressMethod |
|
![]() |
void | SetTouchMethod
(
EButtonTouchMethod::Type InTouchMethod |
|
![]() |
void | ||
![]() ![]() |
const FSlateWidgetClassData & |
Overridden from SWidget
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
FVector2D | ComputeDesiredSize
(
float LayoutScaleMultiplier |
Compute the ideal size necessary to display this widget. |
![]() ![]() |
TSharedRef< FSlateAccessibleWidget > | ||
![]() ![]() ![]() |
FSlateColor | ||
![]() ![]() ![]() |
FSlateColor | ||
![]() ![]() ![]() |
bool | ||
![]() ![]() |
void | OnFocusLost
(
const FFocusEvent& InFocusEvent |
Called when this widget loses focus. This event does not bubble. |
![]() ![]() |
FReply | Called after a key is pressed when this widget has focus (this event bubbles if not handled) | |
![]() ![]() |
FReply | Called after a key is released when this widget has focus | |
![]() ![]() |
FReply | OnMouseButtonDoubleClick
(
const FGeometry& InMyGeometry, |
Called when a mouse button is double clicked. Override this in derived classes. |
![]() ![]() |
FReply | OnMouseButtonDown
(
const FGeometry& MyGeometry, |
MOUSE INPUT The system calls this method to notify the widget that a mouse button was pressed within it. |
![]() ![]() |
FReply | OnMouseButtonUp
(
const FGeometry& MyGeometry, |
The system calls this method to notify the widget that a mouse button was release within it. |
![]() ![]() |
void | OnMouseCaptureLost
(
const FCaptureLostEvent& CaptureLostEvent |
Called when this widget had captured the mouse, but that capture has been revoked for some reason. |
![]() ![]() |
void | OnMouseEnter
(
const FGeometry& MyGeometry, |
The system will use this event to notify a widget that the cursor has entered it. |
![]() ![]() |
void | OnMouseLeave
(
const FPointerEvent& MouseEvent |
The system will use this event to notify a widget that the cursor has left it. |
![]() ![]() |
FReply | OnMouseMove
(
const FGeometry& MyGeometry, |
The system calls this method to notify the widget that a mouse moved within it. |
![]() ![]() ![]() |
int32 | OnPaint
(
const FPaintArgs& Args, |
The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. |
![]() ![]() ![]() |
bool | Checks to see if this widget supports keyboard focus. Override this in derived classes. |
Overridden from FSlateControlledConstruction
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
const FSlateWidgetClassData & |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FArguments |
Typedefs
Name | Description |
---|---|
PrivateParentType | |
PrivateThisType | |
Super | |
ThisClass |
Deprecated Variables
Type | Name | Description | |
---|---|---|---|
![]() |
FMargin | BorderPadding | BorderPadding is now deprecated. Use the ButtonStyle. |
![]() |
TSlateDeprecatedTAttribute< FMargin > | ContentPadding | Direct access to ContentPadding is now deprecated. Use the setter or getter. |
![]() |
const FSlateBrush * | DisabledImage | DisabledImage is now deprecated. Use the ButtonStyle. |
![]() |
const FSlateBrush * | HoverImage | HoverImage is now deprecated. Use the ButtonStyle. |
![]() |
const FSlateBrush * | NormalImage | NormalImage is now deprecated. Use the ButtonStyle. |
![]() |
FMargin | PressedBorderPadding | PressedBorderPadding is now deprecated. Use the ButtonStyle. |
![]() |
const FSlateBrush * | PressedImage | PressedImage is now deprecated. Use the ButtonStyle. |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
const FSlateBrush * | GetBorder () |
GetBorder is deprecated. Use SetBorderImage or GetBorderImage |