Show / Hide Table of Contents

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.

Inheritance
System.Object
UObject
Visual
Widget
PanelWidget
ContentWidget
Button
Inherited Members
ContentWidget.GetContent()
ContentWidget.GetContentSlot()
ContentWidget.SetContent(Widget)
PanelWidget.AddChild(Widget)
PanelWidget.ClearChildren()
PanelWidget.GetChildAt(Int32)
PanelWidget.GetChildIndex(Widget)
PanelWidget.GetChildrenCount()
PanelWidget.HasAnyChildren()
PanelWidget.HasChild(Widget)
PanelWidget.RemoveChild(Widget)
PanelWidget.RemoveChildAt(Int32)
PanelWidget.Slots
Widget.ForceLayoutPrepass()
Widget.ForceVolatile(Boolean)
Widget.GetCachedGeometry(Geometry)
Widget.GetClipping()
Widget.GetDesiredSize()
Widget.GetIsEnabled()
Widget.GetOwningLocalPlayer()
Widget.GetOwningPlayer()
Widget.GetParent()
Widget.GetRenderOpacity()
Widget.GetVisibility()
Widget.HasAnyUserFocus()
Widget.HasFocusedDescendants()
Widget.HasKeyboardFocus()
Widget.HasMouseCapture()
Widget.HasMouseCaptureByUser(Int32, Int32)
Widget.HasUserFocus(PlayerController)
Widget.HasUserFocusedDescendants(PlayerController)
Widget.InvalidateLayoutAndVolatility()
Widget.IsHovered()
Widget.IsVisible()
Widget.RemoveFromParent()
Widget.ResetCursor()
Widget.SetAllNavigationRules(EUINavigationRule, Name)
Widget.SetClipping(EWidgetClipping)
Widget.SetCursor(Byte)
Widget.SetIsEnabled(Boolean)
Widget.SetKeyboardFocus()
Widget.SetNavigationRule(EUINavigation, EUINavigationRule, Name)
Widget.SetRenderAngle(Single)
Widget.SetRenderOpacity(Single)
Widget.SetRenderScale(Vector2D)
Widget.SetRenderShear(Vector2D)
Widget.SetRenderTransform(WidgetTransform)
Widget.SetRenderTransformPivot(Vector2D)
Widget.SetRenderTranslation(Vector2D)
Widget.SetToolTip(Widget)
Widget.SetToolTipText(Byte)
Widget.SetUserFocus(PlayerController)
Widget.SetVisibility(ESlateVisibility)
Widget.Slot
Widget.ToolTipWidget
Widget.RenderTransform
Widget.RenderTransformPivot
Widget.bIsVariable
Widget.bCreatedByConstructionScript
Widget.bIsEnabled
Widget.bOverride_Cursor
Widget.bIsVolatile
Widget.bHiddenInDesigner
Widget.bExpandedInDesigner
Widget.bLockedInDesigner
Widget.Cursor
Widget.RenderOpacity
Widget.Navigation
Widget.NativeBindings
Widget.DesignerFlags
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.UMG
Assembly: UE4DotNet.dll
Syntax
public class Button : ContentWidget
Remarks
  • Single Child
  • Clickable

Properties

| Improve this Doc View Source

BackgroundColor

The color multiplier for the button background

Declaration
public LinearColor BackgroundColor { get; }
Property Value
Type Description
LinearColor
| Improve this Doc View Source

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
| Improve this Doc View Source

ColorAndOpacity

The color multiplier for the button content

Declaration
public LinearColor ColorAndOpacity { get; }
Property Value
Type Description
LinearColor
| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static Button DefaultObject { get; }
Property Value
Type Description
Button
| Improve this Doc View Source

IsFocusable

Declaration
public bool IsFocusable { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

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
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class
| Improve this Doc View Source

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
| Improve this Doc View Source

WidgetStyle

The button style used at runtime

Declaration
public ButtonStyle WidgetStyle { get; set; }
Property Value
Type Description
ButtonStyle

Methods

| Improve this Doc View Source

IsPressed()

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.

| Improve this Doc View Source

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
| Improve this Doc View Source

SetBackgroundColor(LinearColor)

Sets the color multiplier for the button background

Declaration
public void SetBackgroundColor(LinearColor InBackgroundColor)
Parameters
Type Name Description
LinearColor InBackgroundColor
| Improve this Doc View Source

SetClickMethod(Byte)

Set Click Method

Declaration
public void SetClickMethod(byte InClickMethod)
Parameters
Type Name Description
System.Byte InClickMethod
| Improve this Doc View Source

SetColorAndOpacity(LinearColor)

Sets the color multiplier for the button content

Declaration
public void SetColorAndOpacity(LinearColor InColorAndOpacity)
Parameters
Type Name Description
LinearColor InColorAndOpacity
| Improve this Doc View Source

SetPressMethod(Byte)

Set Press Method

Declaration
public void SetPressMethod(byte InPressMethod)
Parameters
Type Name Description
System.Byte InPressMethod
| Improve this Doc View Source

SetStyle(ButtonStyle)

Sets the color multiplier for the button background

Declaration
public void SetStyle(ButtonStyle InStyle)
Parameters
Type Name Description
ButtonStyle InStyle
| Improve this Doc View Source

SetTouchMethod(Byte)

Set Touch Method

Declaration
public void SetTouchMethod(byte InTouchMethod)
Parameters
Type Name Description
System.Byte InTouchMethod

Operators

| Improve this Doc View Source

Implicit(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
  • Improve this Doc
  • View Source
Back to top Generated by DocFX