hkb_editor.gui.dialogs.find_object_dialog
¶
find_dialog
¶
Bases: DpgItem
A filterable table of items with optional selection.
The workhorse behind all the select_* dialogs. Items are pulled from
item_getter every time the filter changes and rendered through
item_to_row. Supports single and multi selection (ctrl/shift click),
an optional right-click context menu and an optional Okay/Cancel row.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item_getter
|
callable
|
Called as |
required |
columns
|
list of str
|
Table column labels. |
required |
item_to_row
|
callable
|
Turns one item into a cell tuple (or a single string). |
str
|
context_menu_func
|
callable
|
Called with the right-clicked item to populate a context menu. |
None
|
okay_callback
|
callable
|
Called as |
None
|
allow_clear
|
bool
|
Add a Clear button that reports |
False
|
item_limit
|
int
|
Max rows to render; derived from the column count if omitted. |
None
|
initial_filter
|
str
|
Filter to apply right away. |
''
|
show_index
|
bool
|
Prepend a running index column. |
False
|
title
|
str
|
Window title bar label. |
'Find...'
|
filter_help
|
str
|
Help text shown in a tooltip behind a '?' button. |
None
|
on_filter_help_click
|
callable
|
Called when the '?' button is clicked. |
None
|
on_result_callback
|
callable
|
Called with the full match list after every filter update. |
None
|
select_color
|
RGBA
|
Row highlight color. |
muted_green
|
multiple
|
bool
|
Allow selecting more than one row. |
False
|
modal
|
bool
|
Make the window modal. |
False
|
hide_on_close
|
bool
|
Hide instead of delete when closed, so the dialog can be reopened. |
False
|
tag
|
int or str
|
Explicit tag; auto-generated if 0. |
0
|
user_data
|
any
|
Passed through to the callbacks. |
None
|
search_objects_dialog
¶
Bases: find_dialog
A non-modal object search window with pin/jump context actions.
Hides instead of closing so it can be reopened cheaply.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
behavior
|
HavokBehavior
|
Behavior to query. |
required |
pin_callback
|
callable
|
Called as |
None
|
jump_callback
|
callable
|
Called as |
None
|
result_callback
|
callable
|
Called as |
None
|
See
|
|
required |
select_animation
¶
Bases: _select_indexed
Pick one or more animation names by index.
select_event
¶
Bases: _select_indexed
Pick one or more behavior events by index.
select_object
¶
Bases: find_dialog
Pick one or more records, optionally restricted to a type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
behavior
|
HavokBehavior
|
Behavior to query. |
required |
target_type_id
|
str or None
|
Restrict candidates to this type; None allows any object. |
required |
on_pointer_selected
|
callable
|
Called as |
required |
include_derived
|
bool
|
Also accept subtypes of |
True
|
See
|
|
required |
select_variable
¶
Bases: _select_indexed
Pick one or more behavior variables by index.