DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

454e2be950e0f51357e96ffd09b2cf34211dbf1b — Jonni Liljamo 1 year, 7 months ago f32dae8
chore(client): remove unused remove_ui
1 files changed, 0 insertions(+), 10 deletions(-)

M client/src/main.rs
M client/src/main.rs => client/src/main.rs +0 -10
@@ 130,13 130,3 @@ pub fn despawn_screen<T: Component>(to_despawn: Query<Entity, With<T>>, mut comm
        commands.entity(entity).despawn_recursive();
    }
}

/// Utility function to remove UI nodes, which is usually just one node
/// NOTE: So, UI shows up as just nodes that don't have parents, so this
///       works mighty fine, at least for now.
///       MAY break something in the future, but that's why this note is here.
pub fn remove_ui(mut commands: Commands, nodes: Query<Entity, (With<Node>, Without<Parent>)>) {
    for node in &nodes {
        commands.entity(node).despawn_recursive();
    }
}