Upgrade to Bevy 0.19 and harden editor workflows
CI / Format, lint, test, build (push) Has been cancelled
CI / Format, lint, test, build (push) Has been cancelled
This commit is contained in:
1 parent
3f85d25cc7
commit
b5e561904c
204 files changed
+6972
-29907
No files matched your search
@@ -350,11 +350,16 @@ pub fn actor_kind_icon(kind: ActorKind) -> &'static str {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct HierarchyLabel {
|
||||
pub icon: &'static str,
|
||||
pub text: String,
|
||||
}
|
||||
|
||||
pub fn hierarchy_label_for_entity(
|
||||
world: &World,
|
||||
entity: Entity,
|
||||
kind: HierarchyNodeKind,
|
||||
) -> String {
|
||||
) -> HierarchyLabel {
|
||||
use egui_phosphor_icons::icons;
|
||||
let icon = world
|
||||
.get::<ActorKind>(entity)
|
||||
@@ -365,18 +370,18 @@ pub fn hierarchy_label_for_entity(
|
||||
HierarchyNodeKind::Generated => icons::STACK.as_str(),
|
||||
HierarchyNodeKind::Runtime => icons::CPU.as_str(),
|
||||
});
|
||||
let mut label = format!("{} {}", icon, entity_name(world, entity));
|
||||
let mut text = entity_name(world, entity);
|
||||
if let Some(light) = world.get::<LightDesc>(entity) {
|
||||
if matches!(light.kind, AuthoringLightKind::Directional) {
|
||||
label.push_str(" ☀");
|
||||
text.push_str(" (sun)");
|
||||
}
|
||||
}
|
||||
match kind {
|
||||
HierarchyNodeKind::Authored => {}
|
||||
HierarchyNodeKind::Generated => label.push_str(" (generated)"),
|
||||
HierarchyNodeKind::Runtime => label.push_str(" (runtime)"),
|
||||
HierarchyNodeKind::Generated => text.push_str(" (generated)"),
|
||||
HierarchyNodeKind::Runtime => text.push_str(" (runtime)"),
|
||||
}
|
||||
label
|
||||
HierarchyLabel { icon, text }
|
||||
}
|
||||
|
||||
pub fn entity_matches_filter(world: &World, entity: Entity, filter_lower: &str) -> bool {
|
||||
|
||||
Reference in new issue
Block a user