Add searching by event for Editor Settings shortcuts and Project Settings input map.

* Focus into the LineEdit, then perform input to search the list of events by the events assigned.
* New specialised editor-only control for this: EventListenerLineEdit. Line edit is a good candidate for such a control because you can focus it, override it's input handling, and show the event all in one control.
Update InputEventConfigurationDialog to use event listener line edit rather than the separate tabs.
* Cleaner look - no need for tabs.
* Simpler code.
This commit is contained in:
EricEzaM 2022-10-03 00:50:05 +10:00
parent e69b7083d4
commit cb6d7fd059
6 changed files with 283 additions and 155 deletions

View file

@ -63,13 +63,13 @@ void InputEventConfigContainer::set_event(const Ref<InputEvent> &p_event) {
Ref<InputEventJoypadMotion> jm = p_event;
if (k.is_valid()) {
config_dialog->set_allowed_input_types(InputEventConfigurationDialog::InputType::INPUT_KEY);
config_dialog->set_allowed_input_types(INPUT_KEY);
} else if (m.is_valid()) {
config_dialog->set_allowed_input_types(InputEventConfigurationDialog::InputType::INPUT_MOUSE_BUTTON);
config_dialog->set_allowed_input_types(INPUT_MOUSE_BUTTON);
} else if (jb.is_valid()) {
config_dialog->set_allowed_input_types(InputEventConfigurationDialog::InputType::INPUT_JOY_BUTTON);
config_dialog->set_allowed_input_types(INPUT_JOY_BUTTON);
} else if (jm.is_valid()) {
config_dialog->set_allowed_input_types(InputEventConfigurationDialog::InputType::INPUT_JOY_MOTION);
config_dialog->set_allowed_input_types(INPUT_JOY_MOTION);
}
input_event = p_event;