Skip to content

Commit

Permalink
update for Bevy 0.14.0-rc.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Jun 29, 2024
1 parent de60de7 commit 19ccc3d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
8 changes: 2 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ categories = ["game-development"]
interpolation = "0.3"

[dependencies.bevy]
version = "0.14.0-rc.3"
version = "0.14.0-rc.4"
default-features = false

[dev-dependencies.bevy]
version = "0.14.0-rc.3"
version = "0.14.0-rc.4"
default-features = false
features = ["bevy_render", "bevy_sprite", "bevy_ui"]

Expand All @@ -43,10 +43,6 @@ default = ["render", "sprite", "ui"]
"bevy/bevy_core_pipeline",
"bevy/default_font",
"bevy/png",
# Should be removed once this is fixed in Bevy 0.14
"bevy/ktx2",
"bevy/zstd",
"bevy/bevy_pbr",
]

[[example]]
Expand Down
5 changes: 2 additions & 3 deletions examples/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ fn spawn_menu(commands: &mut Commands) {
parent
.spawn((
ButtonBundle {
image: UiImage::default()
.with_color(palettes::tailwind::INDIGO_800.into()),
background_color: palettes::tailwind::INDIGO_800.into(),
border_radius: BorderRadius::all(Val::Percent(10.0)),
border_color: BorderColor(
palettes::tailwind::INDIGO_400.into(),
Expand Down Expand Up @@ -281,7 +280,7 @@ fn spawn_logo_points(
};

let resolution = 6;
let window_size = window.single().physical_size().as_vec2();
let window_size = window.single().size();

for i in (0..image.width()).step_by(resolution) {
for j in (0..image.height()).step_by(resolution) {
Expand Down
4 changes: 2 additions & 2 deletions examples/sprite_color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ fn setup(mut commands: Commands, window: Query<&Window>) {
let size = 140.;

let spacing = 1.15;
let screen_x = window.single().width();
let screen_y = window.single().height();
let screen_x = window.single().width() / 2.0;
let screen_y = window.single().height() / 2.0;
let mut x = -screen_x;
let mut y = screen_y;

Expand Down
2 changes: 1 addition & 1 deletion examples/sprite_color_space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn setup(mut commands: Commands, window: Query<&Window>) {
),
];

let size = window.single().height() / color_pairs.len() as f32 * 2.0;
let size = window.single().height() as f32 / color_pairs.len() as f32;

for (i, colors) in color_pairs.iter().enumerate() {
let y = (color_pairs.len() as i32 / 2 - i as i32) as f32 * size - size / 2.0;
Expand Down
4 changes: 2 additions & 2 deletions examples/sprite_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ fn setup(mut commands: Commands, window: Query<&Window>) {
let final_size = 140.;

let spacing = 1.15;
let screen_x = window.single().width();
let screen_y = window.single().height();
let screen_x = window.single().width() / 2.0;
let screen_y = window.single().height() / 2.0;
let mut x = -screen_x;
let mut y = screen_y;

Expand Down

0 comments on commit 19ccc3d

Please sign in to comment.