From cbd061d5731c089e7b3042697607c25349d16328 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 21 Feb 2017 13:52:30 +0900 Subject: [PATCH] Improve appearance of notifications. --- osu.Desktop/Overlays/VersionManager.cs | 20 +++++++++++++++++++ .../Overlays/Notifications/Notification.cs | 1 - .../ProgressCompletionNotification.cs | 10 ++++++++++ .../Notifications/SimpleNotification.cs | 8 +++++--- 4 files changed, 35 insertions(+), 4 deletions(-) diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Desktop/Overlays/VersionManager.cs index 388020dd27..c06b4cce10 100644 --- a/osu.Desktop/Overlays/VersionManager.cs +++ b/osu.Desktop/Overlays/VersionManager.cs @@ -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, + } + }); + } } } } diff --git a/osu.Game/Overlays/Notifications/Notification.cs b/osu.Game/Overlays/Notifications/Notification.cs index 6faa79433e..6ad0fde419 100644 --- a/osu.Game/Overlays/Notifications/Notification.cs +++ b/osu.Game/Overlays/Notifications/Notification.cs @@ -89,7 +89,6 @@ namespace osu.Game.Overlays.Notifications IconContent = new Container { Size = new Vector2(40), - Colour = Color4.DarkGray, Masking = true, CornerRadius = 5, }, diff --git a/osu.Game/Overlays/Notifications/ProgressCompletionNotification.cs b/osu.Game/Overlays/Notifications/ProgressCompletionNotification.cs index a5ec9a3545..61525ed019 100644 --- a/osu.Game/Overlays/Notifications/ProgressCompletionNotification.cs +++ b/osu.Game/Overlays/Notifications/ProgressCompletionNotification.cs @@ -1,7 +1,11 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // 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); + } } } \ No newline at end of file diff --git a/osu.Game/Overlays/Notifications/SimpleNotification.cs b/osu.Game/Overlays/Notifications/SimpleNotification.cs index 24f347eee3..c9c56e8d4a 100644 --- a/osu.Game/Overlays/Notifications/SimpleNotification.cs +++ b/osu.Game/Overlays/Notifications/SimpleNotification.cs @@ -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, } });