// Returns true if an item is hovered (false for a submenu)
Returns true if an item is hovered (false for a submenu)
Returns true if an item is hovered ( false for a submenu )
fn intersect_impl<'a>(&self, menu: &'a Menu, offset: Pt2, path: &mut Vec<&'a str>) -> bool {
        for (item, pos) in with_item_pos(menu.items.iter(), offset) {
            if let Some(sub_menu) = item.sub_menu() {
                if item.hover {
                    // on a submenu label
                    return false;
                }
                if sub_menu.open && sub_menu.any_children_hovered() {
                    path.push(item.label());
                    if !self.intersect_impl(sub_menu, pos + Pt2::new(ITEM_WIDTH - BORDER_SIZE, 0.0), path) {
                        return false;
                    }
                }
            } else {
                if item.hover {
                    path.push(item.label());
                }
            }
        }
        return true;
    }
fn intersect_impl < ' a > ( & self , menu : & ' a Menu , offset : Pt2 , path : & mut Vec < & ' a str > ) -> bool { for ( item , pos ) in with_item_pos ( menu . items . iter ( ) , offset ) { if let Some ( sub_menu ) = item . sub_menu ( ) { if item . hover { // on a submenu label return false ; } if sub_menu . open && sub_menu . any_children_hovered ( ) { path . push ( item . label ( ) ) ; if ! self . intersect_impl ( sub_menu , pos + Pt2 :: new ( ITEM_WIDTH - BORDER_SIZE , 0.0 ) , path ) { return false ; } } } else { if item . hover { path . push ( item . label ( ) ) ; } } } return true ; }
Returns true if an item is hovered (false for a submenu)
Returns true if an item is hovered ( false for a submenu )
&self
menu
&'a Menu
offset
Pt2
path
&mut Vec<&'a str>