feat: update example to bevy 14.1

This commit is contained in:
2024-08-12 23:45:25 +00:00
parent 1defbfc1c9
commit 815891ed33
5 changed files with 716 additions and 526 deletions
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -12,9 +12,10 @@ wayland = ["bevy/wayland"]
windows = ["bevy/bevy_winit"]
[dependencies]
bevy = { version = "0.13.2", default-features = false, features = [
bevy = { version = "0.14.1", default-features = false, features = [
"bevy_asset",
"bevy_text",
"bevy_state",
"bevy_ui",
"dynamic_linking",
"default_font",
+3 -6
View File
@@ -43,19 +43,16 @@
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1712196778,
"narHash": "sha256-SOiwCr2HtmYpw8OvQQVRPtiCBWwndbIoPqtsamZK3J8=",
"lastModified": 1723429325,
"narHash": "sha256-4x/32xTCd+xCwFoI/kKSiCr5LQA2ZlyTRYXKEni5HR8=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "20e7895d1873cc64c14a9f024a8e04f5824bed28",
"rev": "65e3dc0fe079fe8df087cd38f1fe6836a0373aad",
"type": "github"
},
"original": {
@@ -1,2 +1,2 @@
[toolchain]
channel = '1.76.0'
channel = '1.79.0'
@@ -7,7 +7,7 @@
// TODO strum redefine in bevy_controls
use bevy::{ecs::schedule::States, prelude::*};
use bevy::prelude::*;
use bevy_controls::{
contract::InputsContainer,
plugin::ControlsPlugin,
@@ -265,7 +265,7 @@ fn text_update_system(
fn update_text(mut text: Mut<Text>, input_value: InputValue, index: usize) -> Mut<Text> {
if input_value.is_boolean() && input_value.to_boolean() {
text.sections[index].style.color = Color::GOLD;
text.sections[index].style.color = Color::linear_rgb(0.855, 0.647, 0.125);
} else {
text.sections[index].style.color = Color::WHITE;
}