Skip to content

Commit f8db957

Browse files
Track bevy main (#34)
* Update to latest bevy main * cargo fmt -all
1 parent 33f7623 commit f8db957

File tree

11 files changed

+989
-978
lines changed

11 files changed

+989
-978
lines changed

Cargo.lock

Lines changed: 924 additions & 942 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ opt-level = 1
1616
opt-level = 3
1717

1818
[dependencies]
19-
bevy = { version = "0.18", features = [
19+
bevy = { git = "https://github.com/bevyengine/bevy.git", rev = "586f2617200e9b241b42b7835a1c2f2e4faceb50", features = [
2020
"track_location",
2121
"experimental_bevy_feathers",
2222
"debug",

examples/inspector_window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The inspector window shows:
9595
..default()
9696
},
9797
TextFont {
98-
font_size: 16.0,
98+
font_size: FontSize::Px(16.0),
9999
..default()
100100
},
101101
));

src/entity_name_resolution/fuzzy_name_mapping.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ pub fn fuzzy_resource_name_to_id(world: &World, fuzzy_name: &str) -> Option<Comp
6666
let processed_fuzzy_name = fuzzy_name.trim().to_lowercase();
6767

6868
// TODO: this should be much easier to look up, but Bevy's API for this is limited.
69-
let resources = &world.storages().resources;
70-
let resource_ids = resources.iter().map(|(id, _)| id);
69+
let resource_ids = world.resource_entities().iter().map(|(id, _)| *id);
7170
let resource_names: Vec<(ComponentId, String)> = resource_ids
7271
.filter_map(|id| {
7372
let name = world.components().get_name(id)?;

src/entity_name_resolution/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
use bevy::core_pipeline::Skybox;
44
use bevy::ecs::component::ComponentId;
55
use bevy::ecs::system::SystemIdMarker;
6-
use bevy::light::{FogVolume, IrradianceVolume, SunDisk};
6+
use bevy::light::{Atmosphere, FogVolume, IrradianceVolume, SunDisk};
7+
use bevy::pbr::Lightmap;
78
use bevy::pbr::wireframe::Wireframe;
8-
use bevy::pbr::{Atmosphere, Lightmap};
99
use bevy::picking::pointer::PointerId;
1010
use bevy::platform::collections::HashMap;
1111
use bevy::prelude::*;

src/extension_methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ impl WorldInspectionExtensionTrait for World {
302302
&self,
303303
settings: ResourceInspectionSettings,
304304
) -> Result<ResourceInspection, ResourceInspectionError> {
305-
let component_id = self.components().resource_id::<R>().ok_or(
305+
let component_id = self.components().component_id::<R>().ok_or(
306306
ResourceInspectionError::ResourceNotRegistered(type_name::<R>()),
307307
)?;
308308
self.inspect_resource_by_id(component_id, settings)

src/gui/panels/detail_panel.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use bevy::feathers::controls::{ButtonProps, button};
1010
use bevy::feathers::theme::ThemeBackgroundColor;
1111
use bevy::feathers::tokens;
1212
use bevy::prelude::*;
13-
use bevy::reflect::{ReflectRef, VariantType};
13+
use bevy::reflect::{ReflectRef, enums::VariantType};
1414
use bevy::ui::Val::*;
1515
use bevy::ui_widgets::{Activate, ControlOrientation, CoreScrollbarThumb, Scrollbar, observe};
1616

@@ -226,7 +226,7 @@ fn spawn_empty_state_exclusive(
226226
p.spawn((
227227
Text::new(message),
228228
TextFont {
229-
font_size: body_font_size,
229+
font_size: FontSize::Px(body_font_size),
230230
..default()
231231
},
232232
TextColor(muted_text_color),
@@ -248,7 +248,7 @@ fn spawn_error_message(world: &mut World, parent: Entity, config: &InspectorConf
248248
p.spawn((
249249
Text::new(message),
250250
TextFont {
251-
font_size: body_font_size,
251+
font_size: FontSize::Px(body_font_size),
252252
..default()
253253
},
254254
TextColor(error_text_color),
@@ -603,7 +603,7 @@ fn spawn_components_tab_exclusive(
603603
*resolved_name, component_count, memory_display
604604
)),
605605
TextFont {
606-
font_size: title_font_size,
606+
font_size: FontSize::Px(title_font_size),
607607
..default()
608608
},
609609
TextColor(Color::WHITE),
@@ -634,7 +634,7 @@ fn spawn_components_tab_exclusive(
634634
card.spawn((
635635
Text::new(format!("{} | {}", card_data.name, card_data.size)),
636636
TextFont {
637-
font_size: body_font_size,
637+
font_size: FontSize::Px(body_font_size),
638638
..default()
639639
},
640640
TextColor(Color::srgba(0.9, 0.9, 0.9, 1.0)),
@@ -662,7 +662,7 @@ fn spawn_components_tab_exclusive(
662662
row.spawn((
663663
Text::new(format!("{}:", field.name)),
664664
TextFont {
665-
font_size: small_font_size,
665+
font_size: FontSize::Px(small_font_size),
666666
..default()
667667
},
668668
TextColor(field_name_color),
@@ -701,7 +701,7 @@ fn spawn_components_tab_exclusive(
701701
.with_child((
702702
Text::new(format!("{:.2}", editable.numeric_value)),
703703
TextFont {
704-
font_size: small_font_size,
704+
font_size: FontSize::Px(small_font_size),
705705
..default()
706706
},
707707
TextColor(Color::srgba(0.9, 0.9, 0.6, 1.0)), // Yellow for editable
@@ -711,7 +711,7 @@ fn spawn_components_tab_exclusive(
711711
row.spawn((
712712
Text::new(field.value.clone()),
713713
TextFont {
714-
font_size: small_font_size,
714+
font_size: FontSize::Px(small_font_size),
715715
..default()
716716
},
717717
TextColor(muted_text_color),
@@ -725,7 +725,7 @@ fn spawn_components_tab_exclusive(
725725
card.spawn((
726726
Text::new("<no reflected data>"),
727727
TextFont {
728-
font_size: small_font_size,
728+
font_size: FontSize::Px(small_font_size),
729729
..default()
730730
},
731731
TextColor(muted_text_color),
@@ -798,7 +798,7 @@ fn spawn_relationships_tab_exclusive(
798798
p.spawn((
799799
Text::new("Parent"),
800800
TextFont {
801-
font_size: title_font_size,
801+
font_size: FontSize::Px(title_font_size),
802802
..default()
803803
},
804804
TextColor(Color::WHITE),
@@ -823,7 +823,7 @@ fn spawn_relationships_tab_exclusive(
823823
bevy::prelude::Spawn((
824824
Text::new(label),
825825
TextFont {
826-
font_size: body_font_size,
826+
font_size: FontSize::Px(body_font_size),
827827
..default()
828828
},
829829
TextColor(Color::srgba(0.9, 0.9, 0.9, 1.0)),
@@ -836,7 +836,7 @@ fn spawn_relationships_tab_exclusive(
836836
p.spawn((
837837
Text::new("No parent (root entity)"),
838838
TextFont {
839-
font_size: body_font_size,
839+
font_size: FontSize::Px(body_font_size),
840840
..default()
841841
},
842842
TextColor(muted_text_color),
@@ -851,7 +851,7 @@ fn spawn_relationships_tab_exclusive(
851851
p.spawn((
852852
Text::new(format!("Children ({})", children_len)),
853853
TextFont {
854-
font_size: title_font_size,
854+
font_size: FontSize::Px(title_font_size),
855855
..default()
856856
},
857857
TextColor(Color::WHITE),
@@ -865,7 +865,7 @@ fn spawn_relationships_tab_exclusive(
865865
p.spawn((
866866
Text::new("No children"),
867867
TextFont {
868-
font_size: body_font_size,
868+
font_size: FontSize::Px(body_font_size),
869869
..default()
870870
},
871871
TextColor(muted_text_color),
@@ -886,7 +886,7 @@ fn spawn_relationships_tab_exclusive(
886886
bevy::prelude::Spawn((
887887
Text::new(label),
888888
TextFont {
889-
font_size: body_font_size,
889+
font_size: FontSize::Px(body_font_size),
890890
..default()
891891
},
892892
TextColor(Color::srgba(0.9, 0.9, 0.9, 1.0)),
@@ -940,7 +940,7 @@ pub fn spawn_detail_panel(parent: &mut ChildSpawnerCommands<'_>, config: &Inspec
940940
bevy::prelude::Spawn((
941941
Text::new("Components"),
942942
TextFont {
943-
font_size: config.body_font_size,
943+
font_size: FontSize::Px(config.body_font_size),
944944
..default()
945945
},
946946
)),
@@ -956,7 +956,7 @@ pub fn spawn_detail_panel(parent: &mut ChildSpawnerCommands<'_>, config: &Inspec
956956
bevy::prelude::Spawn((
957957
Text::new("Relationships"),
958958
TextFont {
959-
font_size: config.body_font_size,
959+
font_size: FontSize::Px(config.body_font_size),
960960
..default()
961961
},
962962
)),

src/gui/panels/object_list.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ fn spawn_object_row(
283283
bevy::prelude::Spawn((
284284
Text::new(label),
285285
TextFont {
286-
font_size: config.small_font_size,
286+
font_size: FontSize::Px(config.small_font_size),
287287
..default()
288288
},
289289
TextColor(if is_selected {
@@ -379,7 +379,7 @@ pub fn spawn_object_list_panel(parent: &mut ChildSpawnerCommands<'_>, config: &I
379379
bevy::prelude::Spawn((
380380
Text::new("Entities"),
381381
TextFont {
382-
font_size: config.body_font_size,
382+
font_size: FontSize::Px(config.body_font_size),
383383
..default()
384384
},
385385
)),
@@ -393,7 +393,7 @@ pub fn spawn_object_list_panel(parent: &mut ChildSpawnerCommands<'_>, config: &I
393393
bevy::prelude::Spawn((
394394
Text::new("Resources"),
395395
TextFont {
396-
font_size: config.body_font_size,
396+
font_size: FontSize::Px(config.body_font_size),
397397
..default()
398398
},
399399
)),
@@ -432,7 +432,7 @@ pub fn spawn_object_list_panel(parent: &mut ChildSpawnerCommands<'_>, config: &I
432432
search.spawn((
433433
Text::new("Search..."),
434434
TextFont {
435-
font_size: config.body_font_size,
435+
font_size: FontSize::Px(config.body_font_size),
436436
..default()
437437
},
438438
TextColor(config.muted_text_color),

src/gui/plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ fn spawn_title_bar(parent: &mut ChildSpawnerCommands<'_>, config: &InspectorConf
226226
bar.spawn((
227227
Text::new("Feathers Inspector"),
228228
TextFont {
229-
font_size: config.title_font_size + 2.0,
229+
font_size: FontSize::Px(config.title_font_size + 2.0),
230230
..default()
231231
},
232232
TextColor(Color::WHITE),

src/inspection/world_summary.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ pub trait WorldSummaryExt {
156156
impl WorldSummaryExt for World {
157157
fn summarize(&self, settings: SummarySettings) -> WorldSummary {
158158
let total_entities = self.entities().count_spawned();
159-
let total_send_resources = self.storages().resources.len();
160-
let total_non_send_resources = self.storages().non_send_resources.len();
159+
let total_send_resources = self.resource_entities().len();
160+
let total_non_send_resources = self.storages().non_sends.len();
161161
let total_archetypes = self.archetypes().len();
162162
let mut archetype_summaries: Vec<ArchetypeSummary> = self
163163
.archetypes()

0 commit comments

Comments
 (0)