From 8271b139e95663f1fcb038106612afef21fefd8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Sun, 5 Feb 2017 09:40:58 +0100 Subject: [PATCH] Use the framework's new AlwaysPresent switch instead of setting the alpha to 0.01. --- osu-framework | 2 +- osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs | 5 +++-- osu.Game/Graphics/Cursor/OsuCursorContainer.cs | 6 ++++-- osu.Game/Graphics/UserInterface/Nub.cs | 3 ++- osu.Game/Screens/Select/CarouselContainer.cs | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/osu-framework b/osu-framework index f9627494e4..fc864ac9a8 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit f9627494e444d8b35eb20d418539ada15f258c4d +Subproject commit fc864ac9a8fac232654f2c935187a161e107ad9c diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs index 38cee11f23..ee8acf74c8 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs @@ -115,8 +115,9 @@ namespace osu.Game.Modes.Osu.Objects.Drawables base.UpdateInitialState(); body.Alpha = 1; - //we need to be visible to handle input events. note that we still don't get enough events (we don't get a position if the mouse hasn't moved since the slider appeared). - ball.Alpha = 0.01f; + //we need to be present to handle input events. note that we still don't get enough events (we don't get a position if the mouse hasn't moved since the slider appeared). + ball.AlwaysPresent = true; + ball.Alpha = 0; } protected override void UpdateState(ArmedState state) diff --git a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs index 5409ed2f9f..aeca3d36b8 100644 --- a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs @@ -72,7 +72,8 @@ namespace osu.Game.Graphics.Cursor new Box { RelativeSizeAxes = Axes.Both, - Alpha = 0.01f, + Alpha = 0, + AlwaysPresent = true, }, new CircularContainer { @@ -87,7 +88,8 @@ namespace osu.Game.Graphics.Cursor new Box { RelativeSizeAxes = Axes.Both, - Alpha = 0.01f, + Alpha = 0, + AlwaysPresent = true, }, }, }, diff --git a/osu.Game/Graphics/UserInterface/Nub.cs b/osu.Game/Graphics/UserInterface/Nub.cs index 9eca8582cb..bd256b071d 100644 --- a/osu.Game/Graphics/UserInterface/Nub.cs +++ b/osu.Game/Graphics/UserInterface/Nub.cs @@ -39,7 +39,8 @@ namespace osu.Game.Graphics.UserInterface fill = new Box { RelativeSizeAxes = Axes.Both, - Alpha = 0.01f, + Alpha = 0, + AlwaysPresent = true, }, }; } diff --git a/osu.Game/Screens/Select/CarouselContainer.cs b/osu.Game/Screens/Select/CarouselContainer.cs index 017bc6512e..0ec65ae6a8 100644 --- a/osu.Game/Screens/Select/CarouselContainer.cs +++ b/osu.Game/Screens/Select/CarouselContainer.cs @@ -202,7 +202,7 @@ namespace osu.Game.Screens.Select /// Half the draw height of the carousel container. private void updatePanel(Panel p, float halfHeight) { - var height = p.IsVisible ? p.DrawHeight : 0; + var height = p.IsPresent ? p.DrawHeight : 0; float panelDrawY = p.Position.Y - Current + height / 2; float dist = Math.Abs(1f - panelDrawY / halfHeight);