pub fn remove_focus(&mut self, entity: impl Into<Entity>, ctx: &mut Context) {
        let entity = entity.into();

        if let Some(old_focused_element) = self.focused_entity {
            if old_focused_element != entity {
                return;
            }
            let mut old_focused_element = ctx.get_widget(old_focused_element);
            old_focused_element.set("focused", false);
            old_focused_element
                .get_mut::<Selector>("selector")
                .remove_all_similar_states("focused");
            old_focused_element.update(false);
        }

        self.focused_entity = None;
    }
/// Remove the focus of the given entity. If the given entity is
/// not the focused entity nothing will happen.
Remove the focus of the given entity. If the given entity is
not the focused entity nothing will happen.
Remove the focus of the given entity . If the given entity is not the focused entity nothing will happen .
pub fn remove_focus(&mut self, entity: impl Into<Entity>, ctx: &mut Context) {
        let entity = entity.into();
        if let Some(old_focused_element) = self.focused_entity {
            if old_focused_element != entity {
                return;
            }
            let mut old_focused_element = ctx.get_widget(old_focused_element);
            old_focused_element.set("focused", false);
            old_focused_element
                .get_mut::<Selector>("selector")
                .remove_all_similar_states("focused");
            old_focused_element.update(false);
        }
        self.focused_entity = None;
    }
pub fn remove_focus ( & mut self , entity : impl Into < Entity > , ctx : & mut Context ) { let entity = entity . into ( ) ; if let Some ( old_focused_element ) = self . focused_entity { if old_focused_element != entity { return ; } let mut old_focused_element = ctx . get_widget ( old_focused_element ) ; old_focused_element . set ( " " , false ) ; old_focused_element . get_mut :: < Selector > ( " " ) . remove_all_similar_states ( " " ) ; old_focused_element . update ( false ) ; } self . focused_entity = None ; }
Remove the focus of the given entity.
Remove the focus of the given entity .
&mut self
entity
impl Into<Entity>
ctx
&mut Context