unreal.SlateLibrary

class unreal.SlateLibrary(outer=None, name='None')

Bases: unreal.BlueprintFunctionLibrary

Slate Blueprint Library

C++ Source:

  • Module: UMG

  • File: SlateBlueprintLibrary.h

classmethod absolute_to_local(geometry, absolute_coordinate)Vector2D

Absolute coordinates could be either desktop or window space depending on what space the root of the widget hierarchy is in.

Parameters
Returns

Transforms AbsoluteCoordinate into the local space of this Geometry.

Return type

Vector2D

classmethod absolute_to_viewport(world_context_object, absolute_desktop_coordinate) -> (pixel_position=Vector2D, viewport_position=Vector2D)

Translates absolute coordinate in desktop space of the geometry provided into local viewport coordinates.

Parameters
  • world_context_object (Object) –

  • absolute_desktop_coordinate (Vector2D) –

Returns

pixel_position (Vector2D): The position in the game’s viewport, usable for line traces and other uses where you need a coordinate in the space of viewport resolution units.

viewport_position (Vector2D): The position in the space of other widgets in the viewport. Like if you wanted to add another widget to the viewport at the same position in viewport space as this location, this is what you would use.

Return type

tuple

classmethod equal_equal_slate_brush(a, b)bool

Returns whether brushes A and B are identical.

Parameters
Returns

Return type

bool

classmethod get_absolute_size(geometry)Vector2D

Returns the size of the geometry in absolute space.

Parameters

geometry (Geometry) –

Returns

Return type

Vector2D

classmethod get_local_size(geometry)Vector2D

Returns the size of the geometry in local space.

Parameters

geometry (Geometry) –

Returns

Return type

Vector2D

classmethod get_local_top_left(geometry)Vector2D

Returns the local top/left of the geometry in local space.

Parameters

geometry (Geometry) –

Returns

Return type

Vector2D

classmethod is_under_location(geometry, absolute_coordinate)bool

Absolute coordinates could be either desktop or window space depending on what space the root of the widget hierarchy is in.

Parameters
Returns

true if the provided location in absolute coordinates is within the bounds of this geometry.

Return type

bool

classmethod local_to_absolute(geometry, local_coordinate)Vector2D

Translates local coordinates into absolute coordinates

Absolute coordinates could be either desktop or window space depending on what space the root of the widget hierarchy is in.

Parameters
Returns

Absolute coordinates

Return type

Vector2D

classmethod local_to_viewport(world_context_object, geometry, local_coordinate) -> (pixel_position=Vector2D, viewport_position=Vector2D)

Translates local coordinate of the geometry provided into local viewport coordinates.

Parameters
Returns

pixel_position (Vector2D): The position in the game’s viewport, usable for line traces and other uses where you need a coordinate in the space of viewport resolution units.

viewport_position (Vector2D): The position in the space of other widgets in the viewport. Like if you wanted to add another widget to the viewport at the same position in viewport space as this location, this is what you would use.

Return type

tuple

classmethod transform_scalar_absolute_to_local(geometry, absolute_scalar)float

Transform Scalar Absolute to Local

Parameters
Returns

Return type

float

classmethod transform_scalar_local_to_absolute(geometry, local_scalar)float

Transform Scalar Local to Absolute

Parameters
Returns

Return type

float

classmethod transform_vector_absolute_to_local(geometry, absolute_vector)Vector2D

Transform Vector Absolute to Local

Parameters
Returns

Return type

Vector2D

classmethod transform_vector_local_to_absolute(geometry, local_vector)Vector2D

Transform Vector Local to Absolute

Parameters
Returns

Return type

Vector2D