diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-29 11:19:35 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-29 11:19:35 +0200 |
commit | bda8e30e80e870c3fc2f8f545949370301829510 (patch) | |
tree | 1cc53b2102d3f9269c7129bb5174540ee0e21638 /editor/input_event_configuration_dialog.cpp | |
parent | 1e6b11dcd4ad3abb7c621674674b718f5e0a2278 (diff) | |
parent | a5916deb1370f6efa46b70b62657f250021d9176 (diff) | |
download | redot-engine-bda8e30e80e870c3fc2f8f545949370301829510.tar.gz |
Merge pull request #83248 from pkowal1982/event_configuration
(Un)Fold event categories by double click
Diffstat (limited to 'editor/input_event_configuration_dialog.cpp')
-rw-r--r-- | editor/input_event_configuration_dialog.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/input_event_configuration_dialog.cpp b/editor/input_event_configuration_dialog.cpp index 865729c7c3..2ecce2f739 100644 --- a/editor/input_event_configuration_dialog.cpp +++ b/editor/input_event_configuration_dialog.cpp @@ -446,6 +446,11 @@ void InputEventConfigurationDialog::_key_location_selected(int p_location) { _set_event(k, original_event); } +void InputEventConfigurationDialog::_input_list_item_activated() { + TreeItem *selected = input_list_tree->get_selected(); + selected->set_collapsed(!selected->is_collapsed()); +} + void InputEventConfigurationDialog::_input_list_item_selected() { TreeItem *selected = input_list_tree->get_selected(); @@ -670,6 +675,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() { input_list_tree = memnew(Tree); input_list_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); input_list_tree->set_custom_minimum_size(Size2(0, 100 * EDSCALE)); // Min height for tree + input_list_tree->connect("item_activated", callable_mp(this, &InputEventConfigurationDialog::_input_list_item_activated)); input_list_tree->connect("item_selected", callable_mp(this, &InputEventConfigurationDialog::_input_list_item_selected)); input_list_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL); manual_vbox->add_child(input_list_tree); |