Class Button
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.
Inherited Members
Namespace: UE4.UMG
Assembly: UE4DotNet.dll
Syntax
public class Button : ContentWidget
Remarks
- Single Child
- Clickable
Properties
| Improve this Doc View SourceBackgroundColor
The color multiplier for the button background
Declaration
public LinearColor BackgroundColor { get; }
Property Value
Type | Description |
---|---|
LinearColor |
ClickMethod
The type of mouse action required by the user to trigger the buttons 'Click'
Declaration
public byte ClickMethod { get; }
Property Value
Type | Description |
---|---|
System.Byte |
ColorAndOpacity
The color multiplier for the button content
Declaration
public LinearColor ColorAndOpacity { get; }
Property Value
Type | Description |
---|---|
LinearColor |
DefaultObject
Get UE4 Default Object for this Class
Declaration
public static Button DefaultObject { get; }
Property Value
Type | Description |
---|---|
Button |
IsFocusable
Declaration
public bool IsFocusable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
PressMethod
The type of keyboard/gamepad button press action required by the user to trigger the buttons 'Click'
Declaration
public byte PressMethod { get; }
Property Value
Type | Description |
---|---|
System.Byte |
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
TouchMethod
The type of touch action required by the user to trigger the buttons 'Click'
Declaration
public byte TouchMethod { get; }
Property Value
Type | Description |
---|---|
System.Byte |
WidgetStyle
The button style used at runtime
Declaration
public ButtonStyle WidgetStyle { get; set; }
Property Value
Type | Description |
---|---|
ButtonStyle |
Methods
| Improve this Doc View SourceIsPressed()
Returns true if the user is actively pressing the button.
Declaration
public bool IsPressed()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Do not use this for detecting 'Clicks', use the OnClicked event instead.
@return true if the user is actively pressing the button otherwise false.
New(UObject, Name)
Spawn an object of this class
Declaration
public static Button New(UObject obj = null, Name name = default(Name))
Parameters
Type | Name | Description |
---|---|---|
UObject | obj | |
Name | name |
Returns
Type | Description |
---|---|
Button |
SetBackgroundColor(LinearColor)
Sets the color multiplier for the button background
Declaration
public void SetBackgroundColor(LinearColor InBackgroundColor)
Parameters
Type | Name | Description |
---|---|---|
LinearColor | InBackgroundColor |
SetClickMethod(Byte)
Set Click Method
Declaration
public void SetClickMethod(byte InClickMethod)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | InClickMethod |
SetColorAndOpacity(LinearColor)
Sets the color multiplier for the button content
Declaration
public void SetColorAndOpacity(LinearColor InColorAndOpacity)
Parameters
Type | Name | Description |
---|---|---|
LinearColor | InColorAndOpacity |
SetPressMethod(Byte)
Set Press Method
Declaration
public void SetPressMethod(byte InPressMethod)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | InPressMethod |
SetStyle(ButtonStyle)
Sets the color multiplier for the button background
Declaration
public void SetStyle(ButtonStyle InStyle)
Parameters
Type | Name | Description |
---|---|---|
ButtonStyle | InStyle |
SetTouchMethod(Byte)
Set Touch Method
Declaration
public void SetTouchMethod(byte InTouchMethod)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | InTouchMethod |
Operators
| Improve this Doc View SourceImplicit(IntPtr to Button)
Convert from IntPtr to UObject
Declaration
public static implicit operator Button(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | p |
Returns
Type | Description |
---|---|
Button |