2019-05-12 23:36:05 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-07-17 05:50:22 +08:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics.Colour;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Changelog.Header
|
|
|
|
|
{
|
2019-05-15 16:55:26 +08:00
|
|
|
|
public class BreadcrumbRelease : Breadcrumb
|
2018-07-17 05:50:22 +08:00
|
|
|
|
{
|
2018-07-17 21:01:53 +08:00
|
|
|
|
private const float transition_duration = 125;
|
2018-07-17 05:50:22 +08:00
|
|
|
|
|
2019-05-15 16:55:26 +08:00
|
|
|
|
public BreadcrumbRelease(ColourInfo badgeColour, string displayText)
|
2019-05-12 23:36:05 +08:00
|
|
|
|
: base(badgeColour, displayText)
|
2018-07-17 05:50:22 +08:00
|
|
|
|
{
|
2018-07-19 01:32:15 +08:00
|
|
|
|
Text.Font = "Exo2.0-Bold";
|
|
|
|
|
Text.Y = 20;
|
|
|
|
|
Text.Alpha = 0;
|
2018-07-17 05:50:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-05-15 16:55:26 +08:00
|
|
|
|
public void ShowBuild(string displayText = null)
|
2018-07-17 05:50:22 +08:00
|
|
|
|
{
|
2019-05-15 16:55:26 +08:00
|
|
|
|
ShowText(transition_duration, displayText);
|
2018-07-20 06:52:50 +08:00
|
|
|
|
IsActivated = true;
|
2018-07-17 05:50:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Deactivate()
|
|
|
|
|
{
|
2019-05-15 16:55:26 +08:00
|
|
|
|
if (!IsActivated)
|
|
|
|
|
return;
|
|
|
|
|
|
2018-07-17 21:01:53 +08:00
|
|
|
|
HideText(transition_duration);
|
2018-07-17 05:50:22 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|