summaryrefslogtreecommitdiffstats
path: root/editor/plugins/theme_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/theme_editor_plugin.cpp')
-rw-r--r--editor/plugins/theme_editor_plugin.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index ea1756b65a..8f646a7621 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -2174,19 +2174,13 @@ void ThemeTypeDialog::_add_type_filter_cbk(const String &p_value) {
_update_add_type_options(p_value);
}
-void ThemeTypeDialog::_type_filter_input(const Ref<InputEvent> &p_ie) {
- Ref<InputEventKey> k = p_ie;
- if (k.is_valid() && k->is_pressed()) {
- switch (k->get_keycode()) {
- case Key::UP:
- case Key::DOWN:
- case Key::PAGEUP:
- case Key::PAGEDOWN: {
- add_type_options->gui_input(k);
- add_type_filter->accept_event();
- } break;
- default:
- break;
+void ThemeTypeDialog::_type_filter_input(const Ref<InputEvent> &p_event) {
+ // Redirect navigational key events to the item list.
+ Ref<InputEventKey> key = p_event;
+ if (key.is_valid()) {
+ if (key->is_action("ui_up", true) || key->is_action("ui_down", true) || key->is_action("ui_page_up") || key->is_action("ui_page_down")) {
+ add_type_options->gui_input(key);
+ add_type_filter->accept_event();
}
}
}