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. 更多...
#include <Button.h>
继承自 UContentWidget .
Public 成员函数 | |
| bool | IsPressed () const |
| Returns true if the user is actively pressing the button. 更多... | |
| virtual void | PostLoad () override |
| Do any object-specific cleanup required immediately after loading an object. 更多... | |
| void | SetBackgroundColor (FLinearColor InBackgroundColor) |
| Sets the color multiplier for the button background | |
| void | SetColorAndOpacity (FLinearColor InColorAndOpacity) |
| Sets the color multiplier for the button content | |
| void | SetStyle (const FButtonStyle &InStyle) |
| Sets the color multiplier for the button background | |
| virtual void | SynchronizeProperties () override |
| Applies all properties to the native widget if possible. 更多... | |
Public 属性 | |
| FLinearColor | BackgroundColor |
| The color multiplier for the button background | |
| TEnumAsByte< EButtonClickMethod::Type > | ClickMethod |
| The type of mouse action required by the user to trigger the buttons 'Click' | |
| FLinearColor | ColorAndOpacity |
| The color multiplier for the button content | |
| bool | IsFocusable |
| Sometimes a button should only be mouse-clickable and never keyboard focusable. | |
| FOnButtonClickedEvent | OnClicked |
| Called when the button is clicked | |
| FOnButtonPressedEvent | OnPressed |
| Called when the button is pressed | |
| FOnButtonReleasedEvent | OnReleased |
| Called when the button is released | |
| TEnumAsByte< EButtonPressMethod::Type > | PressMethod |
| The type of keyboard/gamepad button press action required by the user to trigger the buttons 'Click' | |
| USlateWidgetStyleAsset * | Style_DEPRECATED |
| The template style asset, used to seed the mutable instance of the style. | |
| TEnumAsByte< EButtonTouchMethod::Type > | TouchMethod |
| The type of touch action required by the user to trigger the buttons 'Click' | |
| FButtonStyle | WidgetStyle |
| The button style used at runtime | |
Protected 成员函数 | |
| virtual TSharedRef< SWidget > | RebuildWidget () override |
| Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | |
| FReply | SlateHandleClicked () |
| Handle the actual click event from slate and forward it on | |
Protected 属性 | |
| TSharedPtr< SButton > | MyButton |
| Cached pointer to the underlying slate button owned by this UWidget | |
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.
| bool UButton::IsPressed | ( | ) | const |
Returns true if the user is actively pressing the button.
Do not use this for detecting 'Clicks', use the OnClicked event instead.
|
overridevirtual |
Do any object-specific cleanup required immediately after loading an object.
This is not called for newly-created objects, and by default will always execute on the game thread.
重载 UPanelWidget .
|
overridevirtual |
Applies all properties to the native widget if possible.
This is called after a widget is constructed. It can also be called by the editor to update modified state, so ensure all initialization to a widgets properties are performed here, or the property and visual state may become unsynced.
重载 UWidget .