Allow full osu!direct usage regardless of supporter status for now

This commit is contained in:
Dean Herbert
2019-01-22 14:22:38 +09:00
parent ca470ffaf0
commit 5ea6e8e247
4 changed files with 60 additions and 29 deletions

View File

@ -1,8 +1,12 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Screens;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
@ -24,7 +28,10 @@ namespace osu.Game.Screens.Menu
public override bool CursorVisible => false;
private const float icon_y = -0.09f;
private readonly List<Drawable> supporterDrawables = new List<Drawable>();
private Drawable heart;
private const float icon_y = -85;
public Disclaimer()
{
@ -42,7 +49,6 @@ namespace osu.Game.Screens.Menu
Origin = Anchor.Centre,
Icon = FontAwesome.fa_warning,
Size = new Vector2(30),
RelativePositionAxes = Axes.Both,
Y = icon_y,
},
textFlow = new LinkFlowContainer
@ -51,8 +57,9 @@ namespace osu.Game.Screens.Menu
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding(50),
TextAnchor = Anchor.TopCentre,
Y = -110,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Origin = Anchor.TopCentre,
Spacing = new Vector2(0, 2),
}
};
@ -68,14 +75,37 @@ namespace osu.Game.Screens.Menu
t.Font = @"Exo2.0-SemiBold";
});
textFlow.AddParagraph("Don't expect everything to work perfectly.");
textFlow.AddParagraph("");
textFlow.AddParagraph("Detailed bug reports are welcomed via github issues.");
textFlow.AddParagraph("");
textFlow.AddParagraph("Things may not work as expected", t => t.TextSize = 20);
textFlow.NewParagraph();
textFlow.AddText("Visit ");
textFlow.AddLink("discord.gg/ppy", "https://discord.gg/ppy");
textFlow.AddText(" if you want to help out or follow progress!");
Action<SpriteText> format = t =>
{
t.TextSize = 15;
t.Font = @"Exo2.0-SemiBold";
};
textFlow.AddParagraph("Detailed bug reports are welcomed via github issues.", format);
textFlow.NewParagraph();
textFlow.AddText("Visit ", format);
textFlow.AddLink("discord.gg/ppy", "https://discord.gg/ppy", creationParameters:format);
textFlow.AddText(" to help out or follow progress!", format);
textFlow.NewParagraph();
textFlow.NewParagraph();
textFlow.NewParagraph();
supporterDrawables.AddRange(textFlow.AddText("Consider becoming an ", format));
supporterDrawables.AddRange(textFlow.AddLink("osu!supporter", "https://osu.ppy.sh/home/support", creationParameters: format));
supporterDrawables.AddRange(textFlow.AddText(" to help support the game", format));
supporterDrawables.Add(heart = textFlow.AddIcon(FontAwesome.fa_heart, t =>
{
t.Padding = new MarginPadding { Left = 5 };
t.TextSize = 12;
t.Colour = colours.Pink;
t.Origin = Anchor.Centre;
}).First());
iconColour = colours.Yellow;
}
@ -90,8 +120,15 @@ namespace osu.Game.Screens.Menu
{
base.OnEntering(last);
icon.Delay(1500).FadeColour(iconColour, 200, Easing.OutQuint);
icon.Delay(1500).MoveToY(icon_y * 1.1f, 100, Easing.OutCirc).Then().MoveToY(icon_y, 100, Easing.InCirc);
icon.Delay(1000).FadeColour(iconColour, 200, Easing.OutQuint);
icon.Delay(1000)
.MoveToY(icon_y * 1.1f, 160, Easing.OutCirc)
.RotateTo(-10, 160, Easing.OutCirc)
.Then()
.MoveToY(icon_y, 160, Easing.InCirc)
.RotateTo(0, 160, Easing.InCirc);
supporterDrawables.ForEach(d => d.FadeOut().Delay(2000).FadeIn(500));
Content
.FadeInFromZero(500)
@ -99,6 +136,8 @@ namespace osu.Game.Screens.Menu
.FadeOut(250)
.ScaleTo(0.9f, 250, Easing.InQuint)
.Finally(d => Push(intro));
heart.FlashColour(Color4.White, 750, Easing.OutQuint).Loop();
}
}
}