Add dev build footer.

This commit is contained in:
Dean Herbert
2017-02-13 20:06:51 +09:00
parent f52e9ddb05
commit 85e85d32fc
2 changed files with 53 additions and 5 deletions

View File

@ -6,6 +6,10 @@ using osu.Game.Overlays;
using osu.Game.Overlays.Notifications; using osu.Game.Overlays.Notifications;
using Squirrel; using Squirrel;
using System.Reflection; using System.Reflection;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics;
using OpenTK;
namespace osu.Desktop.Overlays namespace osu.Desktop.Overlays
{ {
@ -16,20 +20,63 @@ namespace osu.Desktop.Overlays
protected override bool HideOnEscape => false; protected override bool HideOnEscape => false;
public override bool HandleInput => false;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(NotificationManager notification) private void load(NotificationManager notification, OsuColour colours, TextureStore textures)
{ {
this.notification = notification; this.notification = notification;
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
Anchor = Anchor.BottomCentre; Anchor = Anchor.BottomCentre;
Origin = Anchor.BottomCentre; Origin = Anchor.BottomCentre;
Alpha = 0;
var asm = Assembly.GetEntryAssembly().GetName(); var asm = Assembly.GetEntryAssembly().GetName();
Add(new OsuSpriteText Children = new Drawable[]
{ {
Text = $@"osu!lazer v{asm.Version}" new FlowContainer
}); {
AutoSizeAxes = Axes.Both,
Direction = FlowDirections.Vertical,
Children = new Drawable[]
{
new FlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FlowDirections.Horizontal,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Spacing = new Vector2(5),
Children = new Drawable[]
{
new OsuSpriteText
{
Font = @"Exo2.0-Bold",
Text = $@"osu!lazer"
},
new OsuSpriteText
{
Text = $@"{asm.Version}"
},
}
},
new OsuSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
TextSize = 12,
Colour = colours.Yellow,
Font = @"Venera",
Text = $@"Development Build"
},
new Sprite
{
Texture = textures.Get(@"Menu/dev-build-footer"),
},
}
}
};
updateChecker(); updateChecker();
} }
@ -77,6 +124,7 @@ namespace osu.Desktop.Overlays
protected override void PopIn() protected override void PopIn()
{ {
FadeIn(1000);
} }
protected override void PopOut() protected override void PopOut()