From 9f8c66b8c6c8facb815ad9871c196e95b51f1862 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Mon, 12 Jun 2017 13:39:45 +0300 Subject: [PATCH] Forgot to add dropdown-like animation --- osu.Game/Graphics/UserInterface/OsuContextMenu.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/osu.Game/Graphics/UserInterface/OsuContextMenu.cs b/osu.Game/Graphics/UserInterface/OsuContextMenu.cs index 684bc840ec..3aba4afd0a 100644 --- a/osu.Game/Graphics/UserInterface/OsuContextMenu.cs +++ b/osu.Game/Graphics/UserInterface/OsuContextMenu.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using OpenTK; using OpenTK.Graphics; using osu.Framework.Allocation; using osu.Framework.Extensions.Color4Extensions; @@ -40,6 +41,12 @@ namespace osu.Game.Graphics.UserInterface protected override void AnimateOpen() => FadeIn(fade_duration, EasingTypes.OutQuint); protected override void AnimateClose() => FadeOut(fade_duration, EasingTypes.OutQuint); + + protected override void UpdateContentHeight() + { + var actualHeight = (RelativeSizeAxes & Axes.Y) > 0 ? 1 : ContentHeight; + ResizeTo(new Vector2(1, State == MenuState.Opened ? actualHeight : 0), 300, EasingTypes.OutQuint); + } } } } \ No newline at end of file