unreal.CommonButtonGroupBase
¶
- class unreal.CommonButtonGroupBase(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
CommonWidgetGroupBase
Manages an arbitrary collection of CommonButton widgets. Ensures that no more (and optionally, no less) than one button in the group is selected at a time
C++ Source:
Plugin: CommonUI
Module: CommonUI
File: CommonButtonGroupBase.h
Editor Properties: (see get_editor_property/set_editor_property)
on_button_base_clicked
(SimpleButtonBaseGroupDelegate): [Read-Write]on_button_base_double_clicked
(SimpleButtonBaseGroupDelegate): [Read-Write]on_hovered_button_base_changed
(SimpleButtonBaseGroupDelegate): [Read-Write]on_selected_button_base_changed
(SimpleButtonBaseGroupDelegate): [Read-Write]on_selection_cleared
(OnSelectionCleared): [Read-Write]selection_required
(bool): [Read-Write] If true, the group will force that a button be selected at all times
- find_button_index(button_to_find) → int32¶
Find the button index of the specified button, if possible
- Parameters:
button_to_find (CommonButtonBase) – Button to find the index of
- Returns:
Index of the button in the group. INDEX_NONE if not found
- Return type:
int32
- get_button_base_at_index(index) → CommonButtonBase¶
Get Button Base at Index
- Parameters:
index (int32) –
- Return type:
- get_button_count() → int32¶
Get Button Count
- Return type:
int32
- get_hovered_button_index() → int32¶
Get the index of the currently hovered button, if any.
- Return type:
int32
- get_selected_button_base() → CommonButtonBase¶
Get Selected Button Base
- Return type:
- get_selected_button_index() → int32¶
Get the index of the currently selected button, if any.
- Return type:
int32
- property on_button_base_clicked: SimpleButtonBaseGroupDelegate¶
[Read-Write]
- Type:
- property on_button_base_double_clicked: SimpleButtonBaseGroupDelegate¶
[Read-Write]
- Type:
- property on_hovered_button_base_changed: SimpleButtonBaseGroupDelegate¶
[Read-Write]
- Type:
- property on_selected_button_base_changed: SimpleButtonBaseGroupDelegate¶
[Read-Write]
- Type:
- property on_selection_cleared: OnSelectionCleared¶
[Read-Write]
- Type:
- select_button_at_index(button_index, allow_sound=True) → None¶
Selects a button at a specific index in the group. Clears all selection if given an invalid index.
- Parameters:
button_index (int32) – The index of the button in the group to select
allow_sound (bool) – Whether the selected button should play its click sound
- select_next_button(allow_wrap=True) → None¶
Selects the next button in the group
- Parameters:
allow_wrap (bool) – Whether to wrap to the first button if the last one is currently selected
- select_previous_button(allow_wrap=True) → None¶
Selects the previous button in the group
- Parameters:
allow_wrap (bool) – Whether to wrap to the first button if the last one is currently selected
- property selection_required: bool¶
[Read-Only] If true, the group will force that a button be selected at all times
- Type:
(bool)
- set_selection_required(require_selection) → None¶
Sets whether the group should always have a button selected.
- Parameters:
require_selection (bool) – True to force the group to always have a button selected. If true and nothing is selected, will select the first entry. If empty, will select the first button added.