unreal.SlateIMBlueprintFunctionLibrary¶
- class unreal.SlateIMBlueprintFunctionLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrarySlateIM
C++ Source:
Plugin: SlateIM
Module: SlateIMBlueprint
File: SlateIMBlueprintFunctionLibrary.h
- classmethod activate_tab(tab_id) None¶
Causes a one-time activation of a tab in its parent tab well. Can be used at any point during layout.
To use this effectively, all tab ids should be unique. Only the first tab registered with the given id will be activated. Can be called multiple times to activate multiple tabs in the same update. see: ActivateInParent(ETabActivationCause).
- Parameters:
tab_id (Name) – The tab id to activate.
Adds a menu to the menu entry with the given name.
- Parameters:
menu_name (str)
Add a menu item button to the current context menu
- Parameters:
row_text (str) – Label for the menu item
params (SlateIMMenuButtonParams) – Additional parameters used to construct the menu button
- Returns:
Whether the user clicked the menu item this frame
- Return type:
Display a menu item button with a checkmark
- Parameters:
row_text (str) – Label for the menu item
out_current_state (bool) – The current state of the checkmark
params (SlateIMMenuButtonParams) – Additional parameters used to construct the menu button
- Returns:
Whether the user clicked the menu item this frame
out_current_state (bool): The current state of the checkmark
- Return type:
bool or None
Add a new section to the current context menu
- Parameters:
section_text (str) – The label of the section to add
Add a separator to the current context menu
Display a menu item button with a checkbox
- Parameters:
row_text (str) – Label for the menu item
out_current_state (bool) – The current state of the toggle
params (SlateIMMenuButtonParams) – Additional parameters used to construct the menu button
- Returns:
Whether the user toggled the checkbox this frame
out_current_state (bool): The current state of the toggle
- Return type:
bool or None
- classmethod add_table_column(column_id, params) None¶
Adds a column and immediately ends it with the given label as its body.
- Parameters:
column_id (Name) – The name to use as ID for the column
params (SlateIMTableColumnParams) – The params used to create the column
- classmethod begin_border(border_style_name, params) None¶
Begin a container with a background image.
- Parameters:
border_style_name (Name) – The name of the brush in FAppStyle to use as the background for this container
params (SlateIMBorderParams) – Additional params to construct this border
- classmethod begin_canvas(width, height, canvas_params) None¶
Begin queueing commands to draw to a canvas render target.
- Parameters:
width (int32) – The width of the canvas in pixels.
height (int32) – The height of the canvas in pixels.
canvas_params (SlateIMEngineCanvasParams)
Begin an area where a menu appears with a right click
- Returns:
Whether the menu is open
- Return type:
- classmethod begin_disabled_state() None¶
Disables all widgets until EndDisabledState is called. note: It is not possible to enable a widget inside a disabled parent widget by calling EndDisabledState before a child is created inside a disabled Widget.
- classmethod begin_graph() None¶
Begin a graph widget, call graphing functions between this and EndGraph to include multiple graphs in a single chart
- classmethod begin_horizontal_stack(maximize_content=False) None¶
Begins a horizontally stacked container. All widgets created within the Horizontal Stack container will be placed in-order left-to-right
- Parameters:
maximize_content (bool) – Maximize() the contents of the stack
- classmethod begin_horizontal_wrap(maximize_content=False) None¶
Begins a horizontally wrapped container. All widgets created within the Horizontal Wrap container will be placed in-order left-to-right until the allotted width is filled, then the content will begin a new line and so-on. note: Wrap box children are always AutoSize and do not support Fill
- Parameters:
maximize_content (bool) – Maximize() the contents of the wrap
Begin a menu bar, similar to those shown at the top of windows. Can be placed anywhere. see: AddMenuSeparator AddMenuButton AddMenuToggleButton AddMenuCheckButton BeginSubMenu
- classmethod begin_pop_up(border_style_name="ToolPanel.GroupBorder", params) None¶
Begin a container with a background image.
- Parameters:
border_style_name (Name) – The name of the brush in FAppStyle to use as the background for this container
params (SlateIMPopUpParams) – Additional params to construct this border
- classmethod begin_scroll_box(params) bool¶
Begins a container that will allow the user to scroll when its content is larger than the allotted space.
- Parameters:
params (SlateIMScrollBoxParams) – Parameters to create the scroll box
- Returns:
Whether the user scroll the content this frame
- Return type:
Add a submenu item to the current menu
- Parameters:
sub_menu_text (str) – The label for the menu item
- classmethod begin_tab(tab_id, params) bool¶
Begins a Tab to contain any other content
- Parameters:
tab_id (Name) – Provide a tab id that is unique within the Tab Group
params (SlateIMTabParams) – Additional parameters used to create this tab
- Returns:
Returns true if the tab is active, false otherwise. Logic to draw the contents of the tab can be skipped when this is false.
- Return type:
- classmethod begin_tab_group(tab_group_id) None¶
Begin a tab group, can contain TabStacks and TabSplitters
- Parameters:
tab_group_id (Name) – Provide a unique identifier for this tab group
- classmethod begin_tab_splitter(orientation) None¶
Begin a tab splitter, displays child TabSplitters and TabStacks side-by-side
- Parameters:
orientation (Orientation) – The direction to layout child TabSplitters and TabStacks
- classmethod begin_table(params) None¶
Begin a Table container. The contents are automatically scrollable if the table is sized smaller than all its content.
- Parameters:
params (SlateIMTableParams) – Settings for table construction.
- classmethod begin_table_header() None¶
Starts the header. Call this before adding any content to the table.
- classmethod begin_table_row_children(params) bool¶
Begin adding content as a child to the current table row. NextTableCell() must still be called after this function. If the table is a tree, a unique row id must be provided when starting a new set of child rows so that the expansion state of the parent row is saved. Not providing a row id will cause the parent row to revert to the default expansion state if its grandparent row is closed.
- Parameters:
params (SlateIMTableRowChildrenParams) – Params used to begin the table children.
- Returns:
Whether the parent row is expanded or not. When false, the child content can be skipped to save cycles.
- Return type:
- classmethod begin_vertical_stack(maximize_content=False) None¶
Begins a vertically stacked container. All widgets created within the Vertical Stack container will be placed in-order top-to-bottom
- Parameters:
maximize_content (bool) – Maximize() the contents of the stack
- classmethod begin_vertical_wrap(maximize_content=False) None¶
Begins a vertically wrapped container. All widgets created within the Vertical Wrap container will be placed in-order top-to-bottom until the allotted height is filled, then the content will begin a new column and so-on. note: Wrap container children are always AutoSize and do not support Fill
- Parameters:
maximize_content (bool) – Maximize() the contents of the wrap
- classmethod begin_viewport_client_root(unique_name, viewport_client, params) bool¶
Begins a new root in the game viewport
- Parameters:
unique_name (Name) – a globally unique name to identify this root
viewport_client (GameViewportClient) – the viewport client to add the widget to
params (SlateIMViewportParams) – Parameters used to create the root.
- Returns:
Whether the root is valid and updating
- Return type:
- classmethod begin_viewport_player_root(unique_name, local_player, params) bool¶
Begins a new root in the provided player’s viewport
Please use the method below with the struct-parameter.
- Parameters:
unique_name (Name) – a globally unique name to identify this root
local_player (LocalPlayer) – the player whose viewport to add the widget to
params (SlateIMViewportParams)
- Returns:
Whether the root is valid and updating
- Return type:
- classmethod begin_window_root(unique_name, params) bool¶
Begins a new floating window root note: Consider using FSlateIMWindowBase to handle creating and updating your Slate IM Window
- Parameters:
unique_name (Name) – a unique name to identify this window
params (SlateIMWindowParams) – Configuration parameters for the window.
- Returns:
the current window state. True if open, false if closed or not updating
- Return type:
- classmethod button(text, params) bool¶
Display a button with text
- Parameters:
text (str) – The text to display on the button
params (SlateIMButtonParams) – Additional parameters to construct this button
- Returns:
Whether the user clicked the button this frame
- Return type:
- classmethod can_update_slate_im() bool¶
SlateIM updates are disabled in specific scenarios (like when a SlateIM::ModalDialog is open), use this function to react accordingly
- Returns:
Whether SlateIM can update currently
- Return type:
- classmethod check_box(out_current_state, params) bool or None¶
Display a two-state checkbox
- Parameters:
out_current_state (bool) – The current state of the checkbox. Can provide a default value.
params (SlateIMCheckBoxParams) – Additional params to create the checkbox
- Returns:
Whether the user changed the state of the checkbox this frame
out_current_state (bool): The current state of the checkbox. Can provide a default value.
- Return type:
bool or None
- classmethod combo_box(combo_items, out_selected_item_index, params) int32 or None¶
Display a dropdown of text options
- Parameters:
combo_items (Array[str]) – The options the user can choose from
out_selected_item_index (int32) – The index of the currently selected option
params (SlateIMComboBoxParams) – Additional parameter to construct this combo box
- Returns:
Whether the user changed the selected option this frame
out_selected_item_index (int32): The index of the currently selected option
- Return type:
int32 or None
- classmethod draw_border(border_texture, background_texture, left_border_texture, right_border_texture, top_border_texture, bottom_border_texture, canvas_position, canvas_size, render_params) None¶
Queue drawing a border to the canvas.
- Parameters:
border_texture (Texture) – The texture for the center of the border.
background_texture (Texture) – The texture for the background of the border.
left_border_texture (Texture) – The texture for the left of the border.
right_border_texture (Texture) – The texture for the right of the border.
top_border_texture (Texture) – The texture for the top of the border.
bottom_border_texture (Texture) – The texture for the bottom of the border.
canvas_position (Vector2D) – The position of the border on the canvas, in pixels.
canvas_size (Vector2D) – The size of the border on the canvas, in pixels.
render_params (SlateIMEngineBorderRenderParams) – Extra optional params for rendering the border.
- classmethod draw_box(canvas_position, canvas_size, thickness, render_color) None¶
Queue drawing an unfilled box to the canvas.
- Parameters:
canvas_position (Vector2D) – The position of the box on the canvas, in pixels.
canvas_size (Vector2D) – The size of the box on the canvas, in pixels.
thickness (float) – The thicknses of the lines to draw.
render_color (LinearColor) – The color of the lines to draw.
- classmethod draw_icon(icon, canvas_position, scale) None¶
Queue drawing a canvas icon (texture) to the canvas.
- Parameters:
icon (CanvasIcon) – The icon to draw. The texture draw area is in pixels.
canvas_position (Vector2f) – The position of the icon on the canvas, in pixels.
scale (Vector2f) – The scale of the icon.
- classmethod draw_line(canvas_position_a, canvas_position_b, thickness, render_color) None¶
Queue drawing a line to the canvas.
- Parameters:
canvas_position_a (Vector2D) – One end of the line on the canvas, in pixels.
canvas_position_b (Vector2D) – The other end of the line on the canvas, in pixels.
thickness (float) – The thickness of the line in pixels.
render_color (LinearColor) – The color of the line.
- classmethod draw_material(render_material, canvas_position, canvas_size, render_params) None¶
Queue drawing a material to the canvas.
- Parameters:
render_material (MaterialInterface) – The material to draw.
canvas_position (Vector2D) – The position of the material on the canvas, in pixels.
canvas_size (Vector2D) – The size of the material on the canvas, in pixels.
render_params (SlateIMEngineTileRenderParams) – Extra optional parameters for tile drawing. RenderColor and BlendMode are not used.
- classmethod draw_polygon(render_texture, canvas_position, radius, number_of_sides, render_color) None¶
Queue drawing a filled polygon to the canvas.
- Parameters:
render_texture (Texture) – The texture to draw with.
canvas_position (Vector2D) – The position of the center of the polygon on the canvas, in pixels.
radius (Vector2D) – The radius of the polygon, in pixels.
number_of_sides (int32) – The number of sides of the polygon.
render_color (LinearColor) – The color of the polygon.
- classmethod draw_text(render_font, render_text, canvas_position, render_params) None¶
Queue drawing text to the canvas.
- Parameters:
render_font (Font) – The font used to render the text.
render_text (str) – The string to render.
canvas_position (Vector2D) – The position of the text on the canvas, in pixels.
render_params (SlateIMEngineTextRenderParams) – Extra optional parameters for rendering the text.
- classmethod draw_text_render_info(render_font, render_text, canvas_position, scale, render_info) None¶
Queue drawing text to the canvas.
Alternate method allowing the use of FFontRenderInfo.
- Parameters:
render_font (Font) – The font used to render the text.
render_text (str) – The string to render.
canvas_position (Vector2f) – The position of the text on the canvas, in pixels.
scale (Vector2f) – The scale of the text on the canvas.
render_info (FontRenderInfo) – Extra optional parameters for rendering the text.
- classmethod draw_texture(render_texture, canvas_position, canvas_size, render_params) None¶
Queue drawing a texture to the canvas.
- Parameters:
render_texture (Texture) – The texture to draw.
canvas_position (Vector2D) – The position of the texture on the canvas, in pixels.
canvas_size (Vector2D) – The size of the texture on the canvas, in pixels.
render_params (SlateIMEngineTileRenderParams) – Extra optional parameters for tile drawing.
- classmethod draw_wrapped_text(render_font, render_text, canvas_position, center_text_x, center_text_y, scale, render_info) None¶
Queue drawing wrapped text to canvas.
Uses FFontRenderInfo for text effets.
Text size / wrapping is automatically computed based on the position of the text and the see: SetCanvasClip. The default clipping position is the entire canvas. It does not reset between queued calls.
- Parameters:
render_font (Font) – The font used to render the text.
render_text (str) – The text to render.
canvas_position (Vector2f) – The position of the text on the canvas, in pixels.
center_text_x (bool) – If true, the text is centered on the given draw position on the X axis.
center_text_y (bool) – If true, the text is centered on the given draw position on the Y axis.
scale (Vector2f) – The scale of the text on the canvas.
render_info (FontRenderInfo) – Extra optional parameters for rendering the text.
- classmethod editable_text(out_text, params) str or None¶
Create a text input field
- Parameters:
out_text (str) – The text that is in the input field. Can have a default value
params (SlateIMEditableTextParams) – Additional parameters to create this widget
- Returns:
Whether the user changed or committed text this frame
out_text (str): The text that is in the input field. Can have a default value
- Return type:
str or None
End Context Menu Anchor
End the menu bar.
Ends a menu bar entry
- classmethod end_root() None¶
Ends any Root type, must always be called regardless of the result of the Begin function
End Sub Menu
- classmethod end_tab() None¶
Ends the current Tab. This must be called even when BeginTab returns false.
- classmethod end_table_row_children() None¶
Stop adding child content to the parent row. This must be called no matter the result of BeginTableRowChildren()
- classmethod fill() None¶
Sets the next slot to Fill the remaining space in its container note: The filled space is shared equally with any other slots set to Fill the same container
- classmethod fixed_table_column_width(width) None¶
Set the column to a fixed width, not resizable by users. Call this before calling AddTableColumn().
- Parameters:
width (float) – The fixed width of the column
- classmethod get_key_analog_value(key) float¶
Retrieve the analog value for a key
Only considers input events that make it to the SlateIM root. Input events handled by child widgets will not be considered.
- classmethod graph_line_points(points, params) None¶
Add a line graph of 2D vectors to the graph widget
- Parameters:
points (Array[Vector2D]) – The X,Y points to plot on the graph
params (SlateIMGraphLinePointsParams) – Additional parameters used to draw the line
- classmethod graph_line_values(values, params) None¶
Add a line graph of values to the graph widget. The value index is used as the X-value when plotting, the graph will scale horizontally to fit all values in the array.
- Parameters:
values (Array[double]) – The Y values to plot on the graph
params (SlateIMGraphLineValuesParams) – Additional parameters used to draw the line
- classmethod h_align(next_alignment) None¶
Sets the horizontal alignment for the next widget
- Parameters:
next_alignment (HorizontalAlignment) – The alignment to apply to the next widget
- classmethod image(image_texture, params) None¶
Display a texture
- Parameters:
image_texture (Texture2D) – The texture to display
params (SlateIMImageParams) – Additional parameters to display this image
- classmethod image_block(params) None¶
Display a colored box
- Parameters:
params (SlateIMImageParams) – Additional parameters to display this image (including the color)
- classmethod image_material(image_material, brush_size, params) None¶
Display a material
- Parameters:
image_material (MaterialInterface) – The material to display
brush_size (Vector2D) – The size to create the internal brush with
params (SlateIMImageParams) – Additional parameters to display this image
- classmethod image_name(image_style_name, params) None¶
Display a slate style brush
- Parameters:
image_style_name (Name) – The named of the brush to display from FAppStyle
params (SlateIMImageParams) – Additional parameters to display this image
- classmethod image_texture(image_render_target, params) None¶
Display a render target texture
- Parameters:
image_render_target (TextureRenderTarget2D) – The render target texture to display
params (SlateIMImageParams) – Additional parameters to display this image
- classmethod initial_table_column_width(width) None¶
Set the column to an initial width, which can then be resized by users. Call this before calling AddTableColumn().
- Parameters:
width (float) – The initial width of the column
- classmethod invalidate() None¶
Invalidate the current canvas, forcing a redraw if its UpdateType is set to Invalidation.
- classmethod is_focused(depth=SlateIMFocusDepth.INCLUDING_DESCENDANTS) bool¶
Query whether the previous widget is focused
- Parameters:
depth (SlateIMFocusDepth) – How far to check for focus. Includes child widgets by default.
- Returns:
true if the previous widget has focus (for the specified depth), false otherwise
- Return type:
- classmethod is_hovered() bool¶
Query whether the last widget is hovered or not
- Returns:
true if the cursor is hovering the last rendered widget, false otherwise
- Return type:
- classmethod is_key_held(key) bool¶
Query whether a key is being held this frame.
Only considers input events that make it to the SlateIM root. Input events handled by child widgets will not be considered.
- classmethod is_key_pressed(key) bool¶
Query whether a key was pressed this frame.
Only considers input events that make it to the SlateIM root. Input events handled by child widgets will not be considered.
- classmethod is_key_released(key) bool¶
Query whether a key was released this frame.
Only considers input events that make it to the SlateIM root. Input events handled by child widgets will not be considered.
- classmethod max_height(max_height) None¶
Set the maximum height the next slot can have.
- Parameters:
max_height (float)
- classmethod max_width(max_width) None¶
Set the maximum width the next slot can have.
- Parameters:
max_width (float)
- classmethod min_height(min_height) None¶
Set the minimum height the next slot can have.
- Parameters:
min_height (float)
- classmethod min_width(min_width) None¶
Set the minimum width the next slot can have.
- Parameters:
min_width (float)
- classmethod modal_dialog(message_type, dialog_text, params) AppReturnType¶
Opens a modal dialog of the specified type. This function will not return until the user closes the modal dialog note: SlateIM updates are disable while a SlateIM modal is open see: CanUpdateSlateIM()
- Parameters:
message_type (AppMsgType) – The type of options the user can respond to the dialog with
dialog_text (str) – The message to display to the user
params (SlateIMModalDialogParams) – Additional parameters used to create this dialog
- Returns:
The option the user selected
- Return type:
- classmethod next_table_cell() bool or None¶
Begin the content for the next table cell. The column and row are tracked internally based on the number of columns. note: There is no “End” function counterpart to this call. This function supports the various slot functions (Padding, HAlign, VAlign, Min/Max Width/Height, etc).
- Returns:
Whether the contents of this table cell are visible. When false, the content can be skipped to save cycles.
out_row_selected (bool): If supplied, will return true if the row this cell belongs to is selected.
- Return type:
bool or None
- classmethod next_table_column(column_id) None¶
Moves to the next column. Allows fine control of the column body. note: Table columns support SetToolTip, HAlign, and VAlign. See FixedTableColumnWidth() and InitialTableColumnWidth() for size options.
- Parameters:
column_id (Name) – The name to use as ID for the column
- classmethod padding(next_padding) None¶
Sets the padding for the next widget
- Parameters:
next_padding (Margin) – The padding to apply to the next widget
- classmethod progress_bar(percent, params) None¶
Display a progress bar
- Parameters:
percent (Optional[float]) – The value of the progress bar (0.0 to 1.0)
params (SlateIMProgressBarParams) – Additional params to construct the progress bar
- classmethod selection_list(list_items, out_selected_item_index, params) int32 or None¶
Display a list of text options
- Parameters:
list_items (Array[str]) – The list of options the user can choose from
out_selected_item_index (int32) – The index of the currently selected option
params (SlateIMSelectionListParams) – Additional parameters used to construct this selection list
- Returns:
Whether the user changed the selected option this frame
out_selected_item_index (int32): The index of the currently selected option
- Return type:
int32 or None
- classmethod set_clip(clip_position) None¶
Sets the position of the lower-right corner of the clipping region of the canvas
- Parameters:
clip_position (Vector2f)
- classmethod set_linear_draw_color(color) None¶
Sets the draw color of the canvas.
- Parameters:
color (LinearColor)
- classmethod set_tool_tip(next_tool_tip) None¶
Sets the tooltip to be used for the next widget created. Resets after tooltip is used
- Parameters:
next_tool_tip (str) – The tooltip to display
- classmethod slider(out_value, params) float or None¶
Display a float-based slider
- Parameters:
out_value (float) – The current value of the slider. Can provide a default value.
params (SlateIMSliderParams) – Additional parameters to construct this slider
- Returns:
Whether the user changed the value of the slider this frame
out_value (float): The current value of the slider. Can provide a default value.
- Return type:
float or None
- classmethod spacer(size) None¶
Create a block of empty space
- Parameters:
size (Vector2D) – The size of whitespace to create
- classmethod spin_box_double(out_value, params) double or None¶
Display a double-based spin box
- Parameters:
out_value (double) – The current value of the spin box. Can provide a default value.
params (SlateIMSpinBoxDoubleParams) – Additional parameters to create this spinbox
- Returns:
Whether the user changed or committed the spin box value this frame
out_value (double): The current value of the spin box. Can provide a default value.
- Return type:
double or None
- classmethod spin_box_float(out_value, params) float or None¶
Display a float-based spin box
- Parameters:
out_value (float) – The current value of the spin box. Can provide a default value.
params (SlateIMSpinBoxFloatParams) – Additional parameters to create this spinbox
- Returns:
Whether the user changed or committed the spin box value this frame
out_value (float): The current value of the spin box. Can provide a default value.
- Return type:
float or None
- classmethod spin_box_int32(out_value, params) int32 or None¶
Display an int32-based spin box
- Parameters:
out_value (int32) – The current value of the spin box. Can provide a default value.
params (SlateIMSpinBoxInt32Params) – Additional parameters to create this spinbox
- Returns:
Whether the user changed or committed the spin box value this frame
out_value (int32): The current value of the spin box. Can provide a default value.
- Return type:
int32 or None
- classmethod tab_splitter_size_coefficient(size_coefficient) None¶
Assigns the Size Coefficient for the next child of a TabSplitter
- Parameters:
size_coefficient (float) – The weight to assign to the next child of the parent TabSplitter
- classmethod text(text, params) None¶
Display a string of text
- Parameters:
text (str) – The text string to display
params (SlateIMTextParams) – Additional parameters to create the text.
- classmethod v_align(next_alignment) None¶
Sets the vertical alignment for the next widget
- Parameters:
next_alignment (VerticalAlignment) – The alignment to apply to the next widget