From bc4c8936e49cad18a372699646699a3fb576e246 Mon Sep 17 00:00:00 2001
From: Jerome Humbert <djeedai@gmail.com>
Date: Sat, 23 Apr 2022 19:45:32 +0100
Subject: [PATCH] Upgrade `bevy-inspector-egui` and fix examples (#14)

Upgrade the version of `bevy-inspector-egui` to `0.10` for Bevy v0.7
compatibility, otherwise the examples were building with Bevy v0.6. Fix
the examples which now build correctly with Bevy v0.7.
---
 Cargo.toml                        | 2 +-
 examples/colormaterial_color.rs   | 2 +-
 examples/menu.rs                  | 2 +-
 examples/sequence.rs              | 2 +-
 examples/sprite_color.rs          | 2 +-
 examples/text_color.rs            | 2 +-
 examples/transform_rotation.rs    | 2 +-
 examples/transform_translation.rs | 2 +-
 examples/ui_position.rs           | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 435e5c8..c1a693c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,7 +24,7 @@ interpolation = "0.2"
 bevy = { version = "0.7", default-features = false }
 
 [dev-dependencies]
-bevy-inspector-egui = "0.8"
+bevy-inspector-egui = "0.10"
 
 [[example]]
 name = "menu"
diff --git a/examples/colormaterial_color.rs b/examples/colormaterial_color.rs
index 0f67bac..69cd4bd 100644
--- a/examples/colormaterial_color.rs
+++ b/examples/colormaterial_color.rs
@@ -11,7 +11,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
             title: "ColorMaterialColorLens".to_string(),
             width: 1200.,
             height: 600.,
-            vsync: true,
+            present_mode: bevy::window::PresentMode::Fifo, // vsync
             ..Default::default()
         })
         .add_plugins(DefaultPlugins)
diff --git a/examples/menu.rs b/examples/menu.rs
index f9da854..5dafd84 100644
--- a/examples/menu.rs
+++ b/examples/menu.rs
@@ -9,7 +9,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
             title: "Menu".to_string(),
             width: 800.,
             height: 400.,
-            vsync: true,
+            present_mode: bevy::window::PresentMode::Fifo, // vsync
             ..Default::default()
         })
         .add_plugins(DefaultPlugins)
diff --git a/examples/sequence.rs b/examples/sequence.rs
index 84858b5..ebbb51f 100644
--- a/examples/sequence.rs
+++ b/examples/sequence.rs
@@ -8,7 +8,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
             title: "Sequence".to_string(),
             width: 600.,
             height: 600.,
-            vsync: true,
+            present_mode: bevy::window::PresentMode::Fifo, // vsync
             ..Default::default()
         })
         .add_plugins(DefaultPlugins)
diff --git a/examples/sprite_color.rs b/examples/sprite_color.rs
index 959c0f4..44b8a82 100644
--- a/examples/sprite_color.rs
+++ b/examples/sprite_color.rs
@@ -7,7 +7,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
             title: "SpriteColorLens".to_string(),
             width: 1200.,
             height: 600.,
-            vsync: true,
+            present_mode: bevy::window::PresentMode::Fifo, // vsync
             ..Default::default()
         })
         .add_plugins(DefaultPlugins)
diff --git a/examples/text_color.rs b/examples/text_color.rs
index adc513f..29a9dae 100644
--- a/examples/text_color.rs
+++ b/examples/text_color.rs
@@ -10,7 +10,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
             title: "TextColorLens".to_string(),
             width: WIDTH,
             height: HEIGHT,
-            vsync: true,
+            present_mode: bevy::window::PresentMode::Fifo, // vsync
             ..Default::default()
         })
         .add_plugins(DefaultPlugins)
diff --git a/examples/transform_rotation.rs b/examples/transform_rotation.rs
index 7bd06de..6eab861 100644
--- a/examples/transform_rotation.rs
+++ b/examples/transform_rotation.rs
@@ -7,7 +7,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
             title: "TransformRotationLens".to_string(),
             width: 1400.,
             height: 600.,
-            vsync: true,
+            present_mode: bevy::window::PresentMode::Fifo, // vsync
             ..Default::default()
         })
         .add_plugins(DefaultPlugins)
diff --git a/examples/transform_translation.rs b/examples/transform_translation.rs
index 6c4f9a9..007373f 100644
--- a/examples/transform_translation.rs
+++ b/examples/transform_translation.rs
@@ -7,7 +7,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
             title: "TransformPositionLens".to_string(),
             width: 1400.,
             height: 600.,
-            vsync: true,
+            present_mode: bevy::window::PresentMode::Fifo, // vsync
             ..Default::default()
         })
         .add_plugins(DefaultPlugins)
diff --git a/examples/ui_position.rs b/examples/ui_position.rs
index ca331c2..16503cf 100644
--- a/examples/ui_position.rs
+++ b/examples/ui_position.rs
@@ -7,7 +7,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
             title: "UiPositionLens".to_string(),
             width: 1400.,
             height: 600.,
-            vsync: true,
+            present_mode: bevy::window::PresentMode::Fifo, // vsync
             ..Default::default()
         })
         .add_plugins(DefaultPlugins)
-- 
GitLab