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.
-
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) –
- Returns
- 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¶ 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.
-
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
-
classmethod
transform_scalar_local_to_absolute
(geometry, local_scalar) → float¶ Transform Scalar Local to Absolute