Show / Hide Table of Contents

Class WidgetLayoutLibrary

Widget Layout Library

Inheritance
System.Object
UObject
BlueprintFunctionLibrary
WidgetLayoutLibrary
Inherited Members
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 WidgetLayoutLibrary : BlueprintFunctionLibrary

Properties

| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

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

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class

Methods

| Improve this Doc View Source

GetMousePositionOnPlatform()

Gets the platform's mouse cursor position. This is the 'absolute' desktop location of the mouse.

Declaration
public static Vector2D GetMousePositionOnPlatform()
Returns
Type Description
Vector2D
| Improve this Doc View Source

GetMousePositionOnViewport(UObject)

Gets the platform's mouse cursor position in the local space of the viewport widget.

Declaration
public static Vector2D GetMousePositionOnViewport(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
Vector2D
| Improve this Doc View Source

GetMousePositionScaledByDPI(PlayerController)

Gets the mouse position of the player controller, scaled by the DPI.

Declaration
public static (float, float, bool) GetMousePositionScaledByDPI(PlayerController Player)
Parameters
Type Name Description
PlayerController Player
Returns
Type Description
System.ValueTuple<System.Single, System.Single, System.Boolean>
Remarks

If you're trying to go from raw mouse screenspace coordinates to fullscreen widget space, you'll need to transform the mouse into DPI Scaled space. This function performs that scaling.

MousePositionScaledByDPI = MousePosition * (1 / ViewportScale). //DEPRECATED(4.17, "Use GetMousePositionOnViewport() instead. Optionally and for more options, you can use GetViewportWidgetGeometry and GetPlayerScreenWidgetGeometry are newly introduced to give you the geometry of the viewport and the player screen for widgets to help convert between spaces.")

| Improve this Doc View Source

GetPlayerScreenWidgetGeometry(PlayerController)

Gets the geometry of the widget holding all widgets added to the "Player Screen".

Declaration
public static Geometry GetPlayerScreenWidgetGeometry(PlayerController PlayerController)
Parameters
Type Name Description
PlayerController PlayerController
Returns
Type Description
Geometry
Remarks

You can use this geometry to convert between absolute and local space of widgets held on this widget.

| Improve this Doc View Source

GetViewportScale(UObject)

Gets the current DPI Scale being applied to the viewport and all the Widgets.

Declaration
public static float GetViewportScale(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
System.Single
| Improve this Doc View Source

GetViewportSize(UObject)

Gets the size of the game viewport.

Declaration
public static Vector2D GetViewportSize(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
Vector2D
| Improve this Doc View Source

GetViewportWidgetGeometry(UObject)

Gets the geometry of the widget holding all widgets added to the "Viewport".

Declaration
public static Geometry GetViewportWidgetGeometry(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
Geometry
Remarks

You can use this geometry to convert between absolute and local space of widgets held on this widget.

| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

Declaration
public static WidgetLayoutLibrary New(UObject obj = null, Name name = default(Name))
Parameters
Type Name Description
UObject obj
Name name
Returns
Type Description
WidgetLayoutLibrary
| Improve this Doc View Source

ProjectWorldLocationToWidgetPosition(PlayerController, Vector)

Gets the projected world to screen position for a player, then converts it into a widget position, which takes into account any quality scaling.

Declaration
public static (Vector2D, bool) ProjectWorldLocationToWidgetPosition(PlayerController PlayerController, Vector WorldLocation)
Parameters
Type Name Description
PlayerController PlayerController
Vector WorldLocation
Returns
Type Description
System.ValueTuple<Vector2D, System.Boolean>
Remarks

@param PlayerController The player controller to project the position in the world to their screen. @param WorldLocation The world location to project from. @param ScreenPosition The position in the viewport with quality scale removed and DPI scale remove. @return true if the position projects onto the screen.

| Improve this Doc View Source

RemoveAllWidgets(UObject)

Removes all widgets from the viewport.

Declaration
public static void RemoveAllWidgets(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
| Improve this Doc View Source

SlotAsBorderSlot(Widget)

Gets the slot object on the child widget as a Border Slot, allowing you to manipulate layout information.

Declaration
public static BorderSlot SlotAsBorderSlot(Widget Widget)
Parameters
Type Name Description
Widget Widget
Returns
Type Description
BorderSlot
Remarks

@param Widget The child widget of a border panel.

| Improve this Doc View Source

SlotAsCanvasSlot(Widget)

Gets the slot object on the child widget as a Canvas Slot, allowing you to manipulate layout information.

Declaration
public static CanvasPanelSlot SlotAsCanvasSlot(Widget Widget)
Parameters
Type Name Description
Widget Widget
Returns
Type Description
CanvasPanelSlot
Remarks

@param Widget The child widget of a canvas panel.

| Improve this Doc View Source

SlotAsGridSlot(Widget)

Gets the slot object on the child widget as a Grid Slot, allowing you to manipulate layout information.

Declaration
public static GridSlot SlotAsGridSlot(Widget Widget)
Parameters
Type Name Description
Widget Widget
Returns
Type Description
GridSlot
Remarks

@param Widget The child widget of a grid panel.

| Improve this Doc View Source

SlotAsHorizontalBoxSlot(Widget)

Gets the slot object on the child widget as a Horizontal Box Slot, allowing you to manipulate its information.

Declaration
public static HorizontalBoxSlot SlotAsHorizontalBoxSlot(Widget Widget)
Parameters
Type Name Description
Widget Widget
Returns
Type Description
HorizontalBoxSlot
Remarks

@param Widget The child widget of a Horizontal Box.

| Improve this Doc View Source

SlotAsOverlaySlot(Widget)

Gets the slot object on the child widget as a Overlay Slot, allowing you to manipulate layout information.

Declaration
public static OverlaySlot SlotAsOverlaySlot(Widget Widget)
Parameters
Type Name Description
Widget Widget
Returns
Type Description
OverlaySlot
Remarks

@param Widget The child widget of a overlay panel.

| Improve this Doc View Source

SlotAsUniformGridSlot(Widget)

Gets the slot object on the child widget as a Uniform Grid Slot, allowing you to manipulate layout information.

Declaration
public static UniformGridSlot SlotAsUniformGridSlot(Widget Widget)
Parameters
Type Name Description
Widget Widget
Returns
Type Description
UniformGridSlot
Remarks

@param Widget The child widget of a uniform grid panel.

| Improve this Doc View Source

SlotAsVerticalBoxSlot(Widget)

Gets the slot object on the child widget as a Vertical Box Slot, allowing you to manipulate its information.

Declaration
public static VerticalBoxSlot SlotAsVerticalBoxSlot(Widget Widget)
Parameters
Type Name Description
Widget Widget
Returns
Type Description
VerticalBoxSlot
Remarks

@param Widget The child widget of a Vertical Box.

Operators

| Improve this Doc View Source

Implicit(IntPtr to WidgetLayoutLibrary)

Convert from IntPtr to UObject

Declaration
public static implicit operator WidgetLayoutLibrary(IntPtr p)
Parameters
Type Name Description
System.IntPtr p
Returns
Type Description
WidgetLayoutLibrary
  • Improve this Doc
  • View Source
Back to top Generated by DocFX