diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-05-18 09:19:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 09:19:13 +0200 |
commit | 840c8f1cff1c454fd594a0b08bb760303dd9809f (patch) | |
tree | 9e51f29fad6b9adfe700e6b1d5c360120b518838 | |
parent | 55bad664479663a691a684256cc2a98670712c7b (diff) | |
parent | c9abc631084cecdafb6d48d708ef06b18f70a766 (diff) |
Merge pull request #38811 from Calinou/popupmenu-default-allow-search
Allow searching with keyboard input by default in PopupMenu
-rw-r--r-- | scene/gui/option_button.cpp | 3 | ||||
-rw-r--r-- | scene/gui/popup_menu.cpp | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index e7de0f0912..5780cc5e71 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -334,9 +334,6 @@ OptionButton::OptionButton() { popup = memnew(PopupMenu); popup->hide(); add_child(popup); - // popup->set_pass_on_modal_close_click(false); - // popup->set_notify_transform(true); - popup->set_allow_search(true); popup->connect("index_pressed", callable_mp(this, &OptionButton::_selected)); popup->connect("id_focused", callable_mp(this, &OptionButton::_focused)); popup->connect("popup_hide", callable_mp((BaseButton *)this, &BaseButton::set_pressed), varray(false)); diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index b439d85983..6e19b820e0 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -1442,7 +1442,7 @@ PopupMenu::PopupMenu() { during_grabbed_click = false; invalidated_click = false; - allow_search = false; + allow_search = true; search_time_msec = 0; search_string = ""; |