From 92eb8e4fa9700640ab322a0e8d850ae37255c5a0 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Fri, 22 Sep 2017 21:00:45 +0300 Subject: [PATCH] Move blurred icons to a parallax container --- .../Play/BreaksOverlay/ArrowsOverlay.cs | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/osu.Game/Screens/Play/BreaksOverlay/ArrowsOverlay.cs b/osu.Game/Screens/Play/BreaksOverlay/ArrowsOverlay.cs index 8ba801f204..9178daac54 100644 --- a/osu.Game/Screens/Play/BreaksOverlay/ArrowsOverlay.cs +++ b/osu.Game/Screens/Play/BreaksOverlay/ArrowsOverlay.cs @@ -4,6 +4,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics; using OpenTK; +using osu.Game.Graphics.Containers; namespace osu.Game.Screens.Play.BreaksOverlay { @@ -48,24 +49,31 @@ namespace osu.Game.Screens.Play.BreaksOverlay BlurSigma = new Vector2(glow_icon_blur_sigma), Size = new Vector2(glow_icon_size), }, - leftBlurredIcon = new BlurredIcon + new ParallaxContainer { - Anchor = Anchor.Centre, - Origin = Anchor.CentreRight, - X = - blurred_icon_offscreen_offset, - Icon = Graphics.FontAwesome.fa_chevron_right, - BlurSigma = new Vector2(blurred_icon_blur_sigma), - Size = new Vector2(blurred_icon_size), - }, - rightBlurredIcon = new BlurredIcon - { - Anchor = Anchor.Centre, - Origin = Anchor.CentreLeft, - X = blurred_icon_offscreen_offset, - Icon = Graphics.FontAwesome.fa_chevron_left, - BlurSigma = new Vector2(blurred_icon_blur_sigma), - Size = new Vector2(blurred_icon_size), - }, + ParallaxAmount = -0.02f, + Children = new Drawable[] + { + leftBlurredIcon = new BlurredIcon + { + Anchor = Anchor.Centre, + Origin = Anchor.CentreRight, + X = - blurred_icon_offscreen_offset, + Icon = Graphics.FontAwesome.fa_chevron_right, + BlurSigma = new Vector2(blurred_icon_blur_sigma), + Size = new Vector2(blurred_icon_size), + }, + rightBlurredIcon = new BlurredIcon + { + Anchor = Anchor.Centre, + Origin = Anchor.CentreLeft, + X = blurred_icon_offscreen_offset, + Icon = Graphics.FontAwesome.fa_chevron_left, + BlurSigma = new Vector2(blurred_icon_blur_sigma), + Size = new Vector2(blurred_icon_size), + }, + } + } }; }