unreal.SlateLibrary¶
- class unreal.SlateLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrarySlate Blueprint Library
C++ Source:
Module: UMG
File: SlateBlueprintLibrary.h
- classmethod absolute_to_local(geometry, absolute_coordinate) Vector2D¶
Transforms absolute coordinates into local coordinates
Absolute coordinates could be either desktop or window space depending on what space the root of the widget hierarchy is in.
- 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:
- 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:
a (SlateBrush)
b (SlateBrush)
- Return type:
- classmethod get_absolute_size(geometry) Vector2D¶
Returns the size of the geometry in absolute space.
- classmethod get_local_top_left(geometry) Vector2D¶
Returns the local top/left of the geometry in local space.
- 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.
- classmethod local_to_absolute(geometry, local_coordinate) Vector2D¶
Transforms 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.
- 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 scalar_absolute_to_local(geometry, absolute_scalar) float¶
Transforms a scalar from absolute space to local space
- classmethod scalar_local_to_absolute(geometry, local_scalar) float¶
Transforms a scalar from local space to absolute space
- classmethod screen_to_viewport(world_context_object, screen_position) Vector2D¶
Translates a screen position in pixels into the local space of the viewport widget.
- classmethod screen_to_widget_absolute(world_context_object, screen_position, include_window_position=False) Vector2D¶
Translates a screen position in pixels into absolute application coordinates. If bIncludeWindowPosition is true, then this method will also remove the game window’s position (useful when in windowed mode).
- classmethod screen_to_widget_local(world_context_object, geometry, screen_position, include_window_position=False) Vector2D¶
Translates a screen position in pixels into the local space of a widget with the given geometry. If bIncludeWindowPosition is true, then this method will also remove the game window’s position (useful when in windowed mode).
- classmethod transform_scalar_absolute_to_local(geometry, absolute_scalar) float¶
Transform Scalar Absolute to Local deprecated: Returns inverted results. Replace with ‘Local to Absolute (Scalar)’
- classmethod transform_scalar_local_to_absolute(geometry, local_scalar) float¶
Transform Scalar Local to Absolute deprecated: Returns inverted results. Replace with ‘Absolute To Local (Scalar)’
- classmethod transform_vector_absolute_to_local(geometry, absolute_vector) Vector2D¶
Transform Vector Absolute to Local deprecated: Returns inverted results. Replace with ‘Local to Absolute (Vector)’
- classmethod transform_vector_local_to_absolute(geometry, local_vector) Vector2D¶
Transform Vector Local to Absolute deprecated: Returns inverted results. Replace with ‘Absolute To Local (Vector)’