mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Use Interpolation function directly for resizing tab strips.
This commit is contained in:
@ -14,6 +14,7 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
|
using osu.Framework.MathUtils;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
@ -90,7 +91,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
// dont bother calculating if the strip is invisible
|
// dont bother calculating if the strip is invisible
|
||||||
if (strip.Colour.MaxAlpha > 0)
|
if (strip.Colour.MaxAlpha > 0)
|
||||||
strip.ResizeWidthTo(StripWidth(), 500, Easing.OutQuint);
|
strip.Width = Interpolation.ValueAt(MathHelper.Clamp(Clock.ElapsedFrameTime, 0, 1000), strip.Width, StripWidth(), 0, 500, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OsuTabItem : TabItem<T>, IHasAccentColour
|
public class OsuTabItem : TabItem<T>, IHasAccentColour
|
||||||
|
Reference in New Issue
Block a user