1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Improve appearance of notifications.

This commit is contained in:
Dean Herbert 2017-02-21 13:52:30 +09:00
parent bc032aa0a6
commit cbd061d573
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
4 changed files with 35 additions and 4 deletions

View File

@ -4,6 +4,7 @@
using System.Diagnostics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;
@ -174,6 +175,25 @@ namespace osu.Desktop.Overlays
return true;
}
};
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
IconContent.Add(new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientVertical(colours.YellowDark, colours.Yellow)
},
new TextAwesome
{
Anchor = Anchor.Centre,
Icon = FontAwesome.fa_upload,
Colour = Color4.White,
}
});
}
}
}
}

View File

@ -89,7 +89,6 @@ namespace osu.Game.Overlays.Notifications
IconContent = new Container
{
Size = new Vector2(40),
Colour = Color4.DarkGray,
Masking = true,
CornerRadius = 5,
},

View File

@ -1,7 +1,11 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Framework.Graphics.Colour;
using OpenTK.Graphics;
namespace osu.Game.Overlays.Notifications
{
@ -14,5 +18,11 @@ namespace osu.Game.Overlays.Notifications
this.progressNotification = progressNotification;
Icon = FontAwesome.fa_check;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
IconBackgound.ColourInfo = ColourInfo.GradientVertical(colours.GreenDark, colours.GreenLight);
}
}
}

View File

@ -37,19 +37,21 @@ namespace osu.Game.Overlays.Notifications
private SpriteText textDrawable;
private TextAwesome iconDrawable;
protected Box IconBackgound;
public SimpleNotification()
{
IconContent.Add(new Drawable[]
{
new Box
IconBackgound = new Box
{
RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientVertical(OsuColour.Gray(0.2f), OsuColour.Gray(0.5f))
ColourInfo = ColourInfo.GradientVertical(OsuColour.Gray(0.2f), OsuColour.Gray(0.6f))
},
iconDrawable = new TextAwesome
{
Anchor = Anchor.Centre,
Icon = icon ,
Icon = icon,
}
});