summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/src/ui/view/world.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/engine/src/ui/view/world.rs b/engine/src/ui/view/world.rs
index 5667963..96e26f9 100644
--- a/engine/src/ui/view/world.rs
+++ b/engine/src/ui/view/world.rs
@@ -298,7 +298,7 @@ fn create_component_widgets(
frame.same_line();
- frame.text(component_info.name);
+ frame.text(&component_info.name);
if let Some(component_type) = component_info.type_reflection {
let item_type = ItemType::Reflected(component_type);
@@ -316,7 +316,7 @@ fn create_component_widgets(
ItemRef::Mutable(&mut *component),
&mut component_changed,
ItemInfo {
- title: component_info.name,
+ title: &component_info.name,
tag: &format!(
"world_view_entity_{}_component_{}",
ent_handle.uid(),
@@ -418,7 +418,7 @@ fn create_pair_component_widgets(
create_item_title_widget(
frame,
- pair_data_comp_info.name,
+ &pair_data_comp_info.name,
&ItemType::Reflected(pair_data_ty),
None,
);
@@ -432,7 +432,7 @@ fn create_pair_component_widgets(
ItemRef::Mutable(&mut *pair_data),
&mut component_changed,
ItemInfo {
- title: pair_data_comp_info.name,
+ title: &pair_data_comp_info.name,
tag: &format!(
"world_view_entity_{}_pair_component_{pair_id}",
ent_handle.uid(),
@@ -455,7 +455,7 @@ fn get_comp_name_or_ent_name(world: &World, id: Uid) -> Cow<'static, str>
};
if let Some(component_info) = ent.get::<ComponentInfo>() {
- return component_info.name.into();
+ return component_info.name.clone();
}
if let Some(entity_name) = ent.get::<EntityName>() {
@@ -773,7 +773,7 @@ fn show_add_component_popup(
&mut add_component_popup_state.selected_search_result,
&add_component_popup_state.searched_components,
&|(_, comp_info, comp_user_creatable)| ListBoxItem {
- label: comp_info.name.into(),
+ label: comp_info.name.as_ref().into(),
disabled: matches!(
comp_user_creatable,
ComponentUserCreatable::No { .. }
@@ -824,7 +824,7 @@ fn show_add_component_popup(
create_item_title_widget(
frame,
- new_component_info.name,
+ &new_component_info.name,
&ItemType::Reflected(new_component_type),
None,
);
@@ -838,7 +838,7 @@ fn show_add_component_popup(
ItemRef::Mutable(&mut **new_component),
&mut component_changed,
ItemInfo {
- title: new_component_info.name,
+ title: &new_component_info.name,
tag: &format!(
"add_component_popup_component_{}",
new_component_info.name,