diff options
author | firefly2442 <firefly2442@gmail.com> | 2015-09-08 22:48:22 -0500 |
---|---|---|
committer | firefly2442 <firefly2442@gmail.com> | 2015-09-08 22:48:22 -0500 |
commit | 930cb97c7d5e1bd4946564c97ea636ca3ed81963 (patch) | |
tree | 06c9e38fd236ad502e01c83d5e7ab08109953c19 /scene/gui | |
parent | 2d570ac657d71f7967f6a520c672641f64b5272d (diff) |
hide opened menu when click on menu button
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/popup_menu.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index e706053592..5afe2ed704 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -323,8 +323,10 @@ void PopupMenu::_input_event(const InputEvent &p_event) { invalidated_click=false; break; } - if (over<0 || items[over].separator || items[over].disabled) + if (over<0 || items[over].separator || items[over].disabled) { + hide(); break; //non-activable + } if (items[over].submenu!="") { |