From f8cb84ccb1e60dc450707fa154f6f178c250fbb5 Mon Sep 17 00:00:00 2001 From: yuni Date: Tue, 9 Jul 2024 02:40:29 +0200 Subject: [PATCH] bevy14: Upgrade Color method names (set_a -> set_alpha) --- src/hud.rs | 2 +- src/visual.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hud.rs b/src/hud.rs index 6c8f2f5..0d3c6a9 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -970,7 +970,7 @@ fn update_hud( LogLevel::Info => settings.hud_color_console_system, _ => settings.hud_color_console, }; - chat.sections[row].style.color.set_a(opacity); + chat.sections[row].style.color.set_alpha(opacity); row += 1; } diff --git a/src/visual.rs b/src/visual.rs index 229dd3c..7358753 100644 --- a/src/visual.rs +++ b/src/visual.rs @@ -115,7 +115,7 @@ pub fn spawn_effects( FadeOut, NodeBundle { style: style_fullscreen(), - background_color: color.with_a(0.0).into(), + background_color: color.with_alpha(0.0).into(), ..default() }, )); @@ -136,7 +136,7 @@ pub fn update_fadein( continue; } let alpha = (1.3 - 1.3 * (now - effect.start_time) / effect.duration).clamp(0.0, 1.0); - bgcolor.0.set_a(alpha as f32); + bgcolor.0.set_alpha(alpha as f32); } } @@ -152,7 +152,7 @@ pub fn update_fadeout( continue; } let alpha = ((now - effect.start_time) / effect.duration).clamp(0.0, 1.0); - bgcolor.0.set_a(alpha as f32); + bgcolor.0.set_alpha(alpha as f32); } } @@ -175,6 +175,6 @@ fn play_animations( // let threshold = 0.3; // let factor = 1.0 / (1.0 - threshold); // let alpha = (factor * (gforce.blackout - threshold)).clamp(0.0, 1.0); -// bgcolor.0.set_a(alpha as f32); +// bgcolor.0.set_alpha(alpha as f32); // } //}