From 9cd0ec366e2d003e1f6c1923f414010a7208a821 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 19 May 2018 02:51:51 -0300 Subject: [PATCH] Cleanup. --- .../Screens/Multi/Components/RoomInspector.cs | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/osu.Game/Screens/Multi/Components/RoomInspector.cs b/osu.Game/Screens/Multi/Components/RoomInspector.cs index 3de1611b77..ea12b5dbde 100644 --- a/osu.Game/Screens/Multi/Components/RoomInspector.cs +++ b/osu.Game/Screens/Multi/Components/RoomInspector.cs @@ -5,7 +5,6 @@ using System.Linq; using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Extensions.Color4Extensions; -using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Containers; @@ -77,10 +76,6 @@ namespace osu.Game.Screens.Multi.Components } } - public RoomInspector() - { - } - [BackgroundDependencyLoader] private void load(OsuColour colours, LocalisationEngine localisation) { @@ -363,23 +358,31 @@ namespace osu.Game.Screens.Multi.Components { status.Text = s.Message; - foreach (Drawable d in new Drawable[] { statusStrip, status }) - d.FadeColour(s.GetAppropriateColour(colours), transition_duration); + Color4 c = s.GetAppropriateColour(colours); + statusStrip.FadeColour(c, transition_duration); + status.FadeColour(c, transition_duration); } private void updateState() { if (Room == null) { - foreach (Drawable d in new Drawable[] { coverContainer, participantsFlow, participantNumbersFlow, infoPanelFlow, name, participantInfo }) - d.FadeOut(transition_duration); + coverContainer.FadeOut(transition_duration); + participantsFlow.FadeOut(transition_duration); + participantNumbersFlow.FadeOut(transition_duration); + infoPanelFlow.FadeOut(transition_duration); + name.FadeOut(transition_duration); + participantInfo.FadeOut(transition_duration); displayStatus(new RoomStatusNoneSelected()); } else { - foreach (Drawable d in new Drawable[] { participantsFlow, participantNumbersFlow, infoPanelFlow, name, participantInfo }) - d.FadeIn(transition_duration); + participantsFlow.FadeIn(transition_duration); + participantNumbersFlow.FadeIn(transition_duration); + infoPanelFlow.FadeIn(transition_duration); + name.FadeIn(transition_duration); + participantInfo.FadeIn(transition_duration); statusBind.TriggerChange(); beatmapBind.TriggerChange();