From a58a0a4edf25de0e76ee4a11b9679515d48ec49d Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Wed, 22 Feb 2017 16:37:58 -0400 Subject: [PATCH] Fix transition stutter --- osu.Game/Overlays/Mods/ModSection.cs | 25 ++++++++++++++--------- osu.Game/Overlays/WaveOverlayContainer.cs | 3 --- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModSection.cs b/osu.Game/Overlays/Mods/ModSection.cs index 747ecaacb7..fd57e38c53 100644 --- a/osu.Game/Overlays/Mods/ModSection.cs +++ b/osu.Game/Overlays/Mods/ModSection.cs @@ -1,23 +1,28 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . +// Copyright (c) 2007-2017 ppy Pty Ltd = // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using System.Collections.Generic; +using System; +using System.Collections.Generic; using OpenTK; -using OpenTK.Graphics; +using OpenTK.Graphics; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Primitives; +using osu.Framework.Graphics.Primitives; using osu.Game.Graphics.Sprites; using osu.Game.Modes; namespace osu.Game.Overlays.Mods { + class AlwaysPresentFlowContainer : FlowContainer + { + public override bool IsPresent => true; + } + public class ModSection : Container { private OsuSpriteText headerLabel; - private FlowContainer buttonsContainer; + private AlwaysPresentFlowContainer buttonsContainer; public FlowContainer ButtonsContainer { get @@ -95,9 +100,9 @@ namespace osu.Game.Overlays.Mods if (value == colour) return; colour = value; - foreach (ModButton button in buttons) - { - button.Colour = value; + foreach (ModButton button in buttons) + { + button.Colour = value; } } } @@ -148,7 +153,7 @@ namespace osu.Game.Overlays.Mods Font = @"Exo2.0-Bold", Text = Header, }, - buttonsContainer = new FlowContainer + buttonsContainer = new AlwaysPresentFlowContainer { AutoSizeAxes = Axes.Both, Origin = Anchor.BottomLeft, diff --git a/osu.Game/Overlays/WaveOverlayContainer.cs b/osu.Game/Overlays/WaveOverlayContainer.cs index 90feaf8fb3..15f09bede3 100644 --- a/osu.Game/Overlays/WaveOverlayContainer.cs +++ b/osu.Game/Overlays/WaveOverlayContainer.cs @@ -121,9 +121,6 @@ namespace osu.Game.Overlays } } - // TODO: Remove when framework updated - public override bool HandleInput => State == Visibility.Visible; - protected override void PopIn() { base.Show();