Merge branch 'master' into chat-improvement

This commit is contained in:
Thomas Müller
2017-02-22 07:36:42 +01:00
committed by GitHub
4 changed files with 96 additions and 32 deletions

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,
}
});