feat: update example to bevy 14.1
This commit is contained in:
+708
-516
File diff suppressed because it is too large
Load Diff
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user