mirror of
https://github.com/ppy/osu
synced 2024-12-26 00:32:52 +00:00
Improve appearance of notifications.
This commit is contained in:
parent
bc032aa0a6
commit
cbd061d573
@ -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,
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,6 @@ namespace osu.Game.Overlays.Notifications
|
||||
IconContent = new Container
|
||||
{
|
||||
Size = new Vector2(40),
|
||||
Colour = Color4.DarkGray,
|
||||
Masking = true,
|
||||
CornerRadius = 5,
|
||||
},
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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,
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user