Small PopupMenu changes
This commit is contained in:
parent
d123c89c58
commit
ae65dfa4ec
@ -323,11 +323,14 @@ void PopupMenu::_input_event(const InputEvent &p_event) {
|
||||
invalidated_click=false;
|
||||
break;
|
||||
}
|
||||
if (over<0 || items[over].separator || items[over].disabled) {
|
||||
if (over<0) {
|
||||
hide();
|
||||
break; //non-activable
|
||||
}
|
||||
|
||||
if (items[over].separator || items[over].disabled)
|
||||
break;
|
||||
|
||||
if (items[over].submenu!="") {
|
||||
|
||||
_activate_submenu(over);
|
||||
@ -362,8 +365,11 @@ void PopupMenu::_input_event(const InputEvent &p_event) {
|
||||
int over=_get_mouse_over(Point2(m.x,m.y));
|
||||
int id = (over<0 || items[over].separator || items[over].disabled)?-1:items[over].ID;
|
||||
|
||||
if (id<0)
|
||||
if (id<0) {
|
||||
mouse_over=-1;
|
||||
update();
|
||||
break;
|
||||
}
|
||||
|
||||
if (items[over].submenu!="" && submenu_over!=over) {
|
||||
submenu_over=over;
|
||||
|
Loading…
Reference in New Issue
Block a user