pub fn mark_as_dirty(key: &str, entity: Entity, ecm: &mut EntityComponentManager<Tree>) {
    let root = ecm.entity_store().root();

    for entity in ecm.component_store().entities_of_component(key, entity) {
        *ecm.component_store_mut()
            .get_mut::<bool>("dirty", entity)
            .unwrap() = true;

        if let Ok(dirty_widgets) = ecm
            .component_store_mut()
            .get_mut::<Vec<Entity>>("dirty_widgets", root)
        {
            // don't add the same widget twice in a row
            if dirty_widgets.is_empty() || *dirty_widgets.last().unwrap() != entity {
                dirty_widgets.push(entity);
            }
        }
    }
}
/// Mark the widget and shared widgets as dirty.
Mark the widget and shared widgets as dirty.
Mark the widget and shared widgets as dirty .
pub fn mark_as_dirty(key: &str, entity: Entity, ecm: &mut EntityComponentManager<Tree>) {
    let root = ecm.entity_store().root();
    for entity in ecm.component_store().entities_of_component(key, entity) {
        *ecm.component_store_mut()
            .get_mut::<bool>("dirty", entity)
            .unwrap() = true;
        if let Ok(dirty_widgets) = ecm
            .component_store_mut()
            .get_mut::<Vec<Entity>>("dirty_widgets", root)
        {
            // don't add the same widget twice in a row
            if dirty_widgets.is_empty() || *dirty_widgets.last().unwrap() != entity {
                dirty_widgets.push(entity);
            }
        }
    }
}
pub fn mark_as_dirty ( key : & str , entity : Entity , ecm : & mut EntityComponentManager < Tree > ) { let root = ecm . entity_store ( ) . root ( ) ; for entity in ecm . component_store ( ) . entities_of_component ( key , entity ) { * ecm . component_store_mut ( ) . get_mut :: < bool > ( " " , entity ) . unwrap ( ) = true ; if let Ok ( dirty_widgets ) = ecm . component_store_mut ( ) . get_mut :: < Vec < Entity > > ( " " , root ) { // don't add the same widget twice in a row if dirty_widgets . is_empty ( ) || * dirty_widgets . last ( ) . unwrap ( ) != entity { dirty_widgets . push ( entity ) ; } } } }
Mark the widget and shared widgets as dirty.
Mark the widget and shared widgets as dirty .
key
&str
entity
Entity
ecm
&mut EntityComponentManager<Tree>