pub fn mouse_down(&mut self, pos: (usize, usize), asset: &mut Asset, context: &mut ScreenContext) -> bool {

        if let Some(menu) = &mut self.menu {
            if menu.mouse_down(pos, asset, context) {
                self.dirty = true;
                self.clicked = true;
                self.clicked_id = menu.behavior_id.clone();
                return true;
            }
        }

        for atom_widget in &mut self.widgets {
            if atom_widget.mouse_down(pos, asset, context) {
                self.dirty = true;
                self.clicked = true;
                self.clicked_id = atom_widget.behavior_id.clone();
                return true;
            }
        }
        false
    }
/// Check if one of the atom widgets was clicked
Check if one of the atom widgets was clicked
Check if one of the atom widgets was clicked
pub fn mouse_down(&mut self, pos: (usize, usize), asset: &mut Asset, context: &mut ScreenContext) -> bool {
        if let Some(menu) = &mut self.menu {
            if menu.mouse_down(pos, asset, context) {
                self.dirty = true;
                self.clicked = true;
                self.clicked_id = menu.behavior_id.clone();
                return true;
            }
        }
        for atom_widget in &mut self.widgets {
            if atom_widget.mouse_down(pos, asset, context) {
                self.dirty = true;
                self.clicked = true;
                self.clicked_id = atom_widget.behavior_id.clone();
                return true;
            }
        }
        false
    }
pub fn mouse_down ( & mut self , pos : ( usize , usize ) , asset : & mut Asset , context : & mut ScreenContext ) -> bool { if let Some ( menu ) = & mut self . menu { if menu . mouse_down ( pos , asset , context ) { self . dirty = true ; self . clicked = true ; self . clicked_id = menu . behavior_id . clone ( ) ; return true ; } } for atom_widget in & mut self . widgets { if atom_widget . mouse_down ( pos , asset , context ) { self . dirty = true ; self . clicked = true ; self . clicked_id = atom_widget . behavior_id . clone ( ) ; return true ; } } false }
Check if one of the atom widgets was clicked
Check if one of the atom widgets was clicked
&mut self
pos
(usize, usize)
asset
&mut Asset
context
&mut ScreenContext
&mut self
pos
(usize, usize)
asset
&mut Asset
context
&mut ScreenContext