mirror of
https://github.com/osukey/osukey.git
synced 2025-06-27 14:18:06 +09:00
Merge pull request #13727 from peppy/update-disclaimer
Update disclaimer
This commit is contained in:
commit
ace57a9ee9
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
@ -36,6 +37,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
private readonly Bindable<User> currentUser = new Bindable<User>();
|
private readonly Bindable<User> currentUser = new Bindable<User>();
|
||||||
private FillFlowContainer fill;
|
private FillFlowContainer fill;
|
||||||
|
|
||||||
|
private readonly List<Drawable> expendableText = new List<Drawable>();
|
||||||
|
|
||||||
public Disclaimer(OsuScreen nextScreen = null)
|
public Disclaimer(OsuScreen nextScreen = null)
|
||||||
{
|
{
|
||||||
this.nextScreen = nextScreen;
|
this.nextScreen = nextScreen;
|
||||||
@ -54,7 +57,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Icon = FontAwesome.Solid.Flask,
|
Icon = OsuIcon.Logo,
|
||||||
Size = new Vector2(icon_size),
|
Size = new Vector2(icon_size),
|
||||||
Y = icon_y,
|
Y = icon_y,
|
||||||
},
|
},
|
||||||
@ -70,37 +73,55 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
textFlow = new LinkFlowContainer
|
textFlow = new LinkFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
Width = 680,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
TextAnchor = Anchor.TopCentre,
|
TextAnchor = Anchor.TopCentre,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Spacing = new Vector2(0, 2),
|
Spacing = new Vector2(0, 2),
|
||||||
LayoutDuration = 2000,
|
},
|
||||||
LayoutEasing = Easing.OutQuint
|
}
|
||||||
},
|
},
|
||||||
supportFlow = new LinkFlowContainer
|
supportFlow = new LinkFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
TextAnchor = Anchor.TopCentre,
|
TextAnchor = Anchor.BottomCentre,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.BottomCentre,
|
||||||
|
Padding = new MarginPadding(20),
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
Spacing = new Vector2(0, 2),
|
Spacing = new Vector2(0, 2),
|
||||||
},
|
},
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
textFlow.AddText("This project is an ongoing ", t => t.Font = t.Font.With(Typeface.Torus, 30, FontWeight.Light));
|
textFlow.AddText("this is osu!", t => t.Font = t.Font.With(Typeface.Torus, 30, FontWeight.Regular));
|
||||||
textFlow.AddText("work in progress", t => t.Font = t.Font.With(Typeface.Torus, 30, FontWeight.SemiBold));
|
|
||||||
|
expendableText.AddRange(textFlow.AddText("lazer", t =>
|
||||||
|
{
|
||||||
|
t.Font = t.Font.With(Typeface.Torus, 30, FontWeight.Regular);
|
||||||
|
t.Colour = colours.PinkLight;
|
||||||
|
}));
|
||||||
|
|
||||||
|
static void formatRegular(SpriteText t) => t.Font = OsuFont.GetFont(size: 20, weight: FontWeight.Regular);
|
||||||
|
static void formatSemiBold(SpriteText t) => t.Font = OsuFont.GetFont(size: 20, weight: FontWeight.SemiBold);
|
||||||
|
|
||||||
textFlow.NewParagraph();
|
textFlow.NewParagraph();
|
||||||
|
|
||||||
static void format(SpriteText t) => t.Font = OsuFont.GetFont(size: 15, weight: FontWeight.SemiBold);
|
textFlow.AddText("the next ", formatRegular);
|
||||||
|
textFlow.AddText("major update", t =>
|
||||||
|
{
|
||||||
|
t.Font = t.Font.With(Typeface.Torus, 20, FontWeight.SemiBold);
|
||||||
|
t.Colour = colours.Pink;
|
||||||
|
});
|
||||||
|
expendableText.AddRange(textFlow.AddText(" coming to osu!", formatRegular));
|
||||||
|
textFlow.AddText(".", formatRegular);
|
||||||
|
|
||||||
textFlow.AddParagraph(getRandomTip(), t => t.Font = t.Font.With(Typeface.Torus, 20, FontWeight.SemiBold));
|
textFlow.NewParagraph();
|
||||||
|
textFlow.NewParagraph();
|
||||||
|
|
||||||
|
textFlow.AddParagraph("today's tip:", formatSemiBold);
|
||||||
|
textFlow.AddParagraph(getRandomTip(), formatRegular);
|
||||||
textFlow.NewParagraph();
|
textFlow.NewParagraph();
|
||||||
|
|
||||||
textFlow.NewParagraph();
|
textFlow.NewParagraph();
|
||||||
@ -116,19 +137,19 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
if (e.NewValue.IsSupporter)
|
if (e.NewValue.IsSupporter)
|
||||||
{
|
{
|
||||||
supportFlow.AddText("Eternal thanks to you for supporting osu!", format);
|
supportFlow.AddText("Eternal thanks to you for supporting osu!", formatSemiBold);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
supportFlow.AddText("Consider becoming an ", format);
|
supportFlow.AddText("Consider becoming an ", formatSemiBold);
|
||||||
supportFlow.AddLink("osu!supporter", "https://osu.ppy.sh/home/support", creationParameters: format);
|
supportFlow.AddLink("osu!supporter", "https://osu.ppy.sh/home/support", formatSemiBold);
|
||||||
supportFlow.AddText(" to help support the game", format);
|
supportFlow.AddText(" to help support osu!'s development", formatSemiBold);
|
||||||
}
|
}
|
||||||
|
|
||||||
heart = supportFlow.AddIcon(FontAwesome.Solid.Heart, t =>
|
heart = supportFlow.AddIcon(FontAwesome.Solid.Heart, t =>
|
||||||
{
|
{
|
||||||
t.Padding = new MarginPadding { Left = 5, Top = 3 };
|
t.Padding = new MarginPadding { Left = 5, Top = 3 };
|
||||||
t.Font = t.Font.With(size: 12);
|
t.Font = t.Font.With(size: 20);
|
||||||
t.Origin = Anchor.Centre;
|
t.Origin = Anchor.Centre;
|
||||||
t.Colour = colours.Pink;
|
t.Colour = colours.Pink;
|
||||||
}).First();
|
}).First();
|
||||||
@ -169,7 +190,15 @@ namespace osu.Game.Screens.Menu
|
|||||||
.MoveToY(icon_y, 160, Easing.InQuart)
|
.MoveToY(icon_y, 160, Easing.InQuart)
|
||||||
.FadeColour(Color4.White, 160);
|
.FadeColour(Color4.White, 160);
|
||||||
|
|
||||||
fill.Delay(520 + 160).MoveToOffset(new Vector2(0, 15), 160, Easing.OutQuart);
|
using (BeginDelayedSequence(520 + 160))
|
||||||
|
{
|
||||||
|
fill.MoveToOffset(new Vector2(0, 15), 160, Easing.OutQuart);
|
||||||
|
Schedule(() => expendableText.ForEach(t =>
|
||||||
|
{
|
||||||
|
t.FadeOut(100);
|
||||||
|
t.ScaleTo(new Vector2(0, 1), 100, Easing.OutQuart);
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
supportFlow.FadeOut().Delay(2000).FadeIn(500);
|
supportFlow.FadeOut().Delay(2000).FadeIn(500);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user