diff --git a/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs b/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs index e8b60bab81..c57e361916 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs @@ -1,72 +1,68 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Colour; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Primitives; -using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.Textures; -using osu.Framework.MathUtils; -using osu.Game.Database; -using osu.Game.Graphics; -using osu.Game.Graphics.Backgrounds; -using osu.Game.Graphics.UserInterface; -using OpenTK; -using OpenTK.Graphics; +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Colour; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Primitives; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Textures; +using osu.Framework.MathUtils; +using osu.Game.Database; +using osu.Game.Graphics; +using osu.Game.Graphics.Backgrounds; +using osu.Game.Graphics.UserInterface; +using OpenTK; +using OpenTK.Graphics; using osu.Framework.Input; -namespace osu.Game.Beatmaps.Drawables -{ - class BeatmapPanel : Panel - { - public BeatmapInfo Beatmap; - private Sprite background; - +namespace osu.Game.Beatmaps.Drawables +{ + class BeatmapPanel : Panel + { + public BeatmapInfo Beatmap; + private Sprite background; + public Action GainedSelection; public Action StartRequested; - Color4 deselectedColour = new Color4(20, 43, 51, 255); - protected override void Selected() { base.Selected(); GainedSelection?.Invoke(this); - background.ColourInfo = ColourInfo.GradientVertical( - new Color4(20, 43, 51, 255), - new Color4(40, 86, 102, 255)); - } - + background.ColourInfo = OsuColor.BeatmapPanelSelected; + } + protected override void Deselected() { base.Deselected(); - background.Colour = deselectedColour; - } - + background.Colour = OsuColor.BeatmapPanelUnselected; + } + protected override bool OnClick(InputState state) { if (State == PanelSelectedState.Selected) StartRequested?.Invoke(this); return base.OnClick(state); - } - - public BeatmapPanel(BeatmapInfo beatmap) + } + + public BeatmapPanel(BeatmapInfo beatmap) { Beatmap = beatmap; - Height *= 0.60f; - - Children = new Drawable[] - { - background = new Box - { - RelativeSizeAxes = Axes.Both, - }, - new Triangles + Height *= 0.60f; + + Children = new Drawable[] + { + background = new Box + { + RelativeSizeAxes = Axes.Both, + }, + new Triangles { // The border is drawn in the shader of the children. Being additive, triangles would over-emphasize // the border wherever they cross it, and thus they get their own masking container without a border. @@ -74,70 +70,70 @@ namespace osu.Game.Beatmaps.Drawables CornerRadius = Content.CornerRadius, RelativeSizeAxes = Axes.Both, BlendingMode = BlendingMode.Additive, - Colour = deselectedColour, - }, - new FlowContainer - { - Padding = new MarginPadding(5), - Direction = FlowDirection.HorizontalOnly, - AutoSizeAxes = Axes.Both, + Colour = OsuColor.BeatmapPanelUnselected, + }, + new FlowContainer + { + Padding = new MarginPadding(5), + Direction = FlowDirection.HorizontalOnly, + AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft, - Origin = Anchor.CentreLeft, - Children = new Drawable[] - { - new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(159, 198, 0, 255)) + Origin = Anchor.CentreLeft, + Children = new Drawable[] + { + new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(159, 198, 0, 255)) { Scale = new Vector2(1.8f), Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, - }, - new FlowContainer - { - Padding = new MarginPadding { Left = 5 }, - Spacing = new Vector2(0, 5), - Direction = FlowDirection.VerticalOnly, - AutoSizeAxes = Axes.Both, - Children = new Drawable[] - { - new FlowContainer - { - Direction = FlowDirection.HorizontalOnly, - AutoSizeAxes = Axes.Both, - Spacing = new Vector2(4, 0), - Children = new[] - { - new SpriteText - { - Font = @"Exo2.0-Medium", - Text = beatmap.Version, - TextSize = 20, - Anchor = Anchor.BottomLeft, - Origin = Anchor.BottomLeft - }, - new SpriteText - { - Font = @"Exo2.0-Medium", - Text = "mapped by", - TextSize = 16, - Anchor = Anchor.BottomLeft, - Origin = Anchor.BottomLeft - }, - new SpriteText - { - Font = @"Exo2.0-MediumItalic", - Text = $"{(beatmap.Metadata ?? beatmap.BeatmapSet.Metadata).Author}", - TextSize = 16, - Anchor = Anchor.BottomLeft, - Origin = Anchor.BottomLeft - }, - } - }, - new StarCounter { Count = beatmap.BaseDifficulty?.OverallDifficulty ?? 5, StarSize = 8 } - } - } - } - } - }; + }, + new FlowContainer + { + Padding = new MarginPadding { Left = 5 }, + Spacing = new Vector2(0, 5), + Direction = FlowDirection.VerticalOnly, + AutoSizeAxes = Axes.Both, + Children = new Drawable[] + { + new FlowContainer + { + Direction = FlowDirection.HorizontalOnly, + AutoSizeAxes = Axes.Both, + Spacing = new Vector2(4, 0), + Children = new[] + { + new SpriteText + { + Font = @"Exo2.0-Medium", + Text = beatmap.Version, + TextSize = 20, + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft + }, + new SpriteText + { + Font = @"Exo2.0-Medium", + Text = "mapped by", + TextSize = 16, + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft + }, + new SpriteText + { + Font = @"Exo2.0-MediumItalic", + Text = $"{(beatmap.Metadata ?? beatmap.BeatmapSet.Metadata).Author}", + TextSize = 16, + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft + }, + } + }, + new StarCounter { Count = beatmap.BaseDifficulty?.OverallDifficulty ?? 5, StarSize = 8 } + } + } + } + } + }; } - } -} + } +} diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index 7234e2ad8b..98a010efe1 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -1,74 +1,74 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; -using osu.Framework.Allocation; -using osu.Framework.Configuration; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Colour; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Primitives; -using osu.Framework.Graphics.Sprites; -using osu.Game.Configuration; -using osu.Game.Graphics; -using OpenTK; -using OpenTK.Graphics; - +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using osu.Framework.Allocation; +using osu.Framework.Configuration; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Colour; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Primitives; +using osu.Framework.Graphics.Sprites; +using osu.Game.Configuration; +using osu.Game.Graphics; +using OpenTK; +using OpenTK.Graphics; + namespace osu.Game.Beatmaps.Drawables { - class BeatmapSetHeader : Panel - { - public Action GainedSelection; - private SpriteText title, artist; - private OsuConfigManager config; - private Bindable preferUnicode; - private WorkingBeatmap beatmap; - - public BeatmapSetHeader(WorkingBeatmap beatmap) - { - this.beatmap = beatmap; - - Children = new Drawable[] - { + class BeatmapSetHeader : Panel + { + public Action GainedSelection; + private SpriteText title, artist; + private OsuConfigManager config; + private Bindable preferUnicode; + private WorkingBeatmap beatmap; + + public BeatmapSetHeader(WorkingBeatmap beatmap) + { + this.beatmap = beatmap; + + Children = new Drawable[] + { new PanelBackground(beatmap) { RelativeSizeAxes = Axes.Both, }, - new FlowContainer - { - Direction = FlowDirection.VerticalOnly, - Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 }, - AutoSizeAxes = Axes.Both, - Children = new[] - { - title = new SpriteText - { - Font = @"Exo2.0-BoldItalic", - Text = beatmap.BeatmapSetInfo.Metadata.Title, - TextSize = 22, - Shadow = true, - }, - artist = new SpriteText - { - Margin = new MarginPadding { Top = -1 }, - Font = @"Exo2.0-SemiBoldItalic", - Text = beatmap.BeatmapSetInfo.Metadata.Artist, - TextSize = 17, - Shadow = true, - }, - new FlowContainer - { - Margin = new MarginPadding { Top = 5 }, - AutoSizeAxes = Axes.Both, - Children = new[] - { - new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(159, 198, 0, 255)), - new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(246, 101, 166, 255)), - } - } - } - } - }; + new FlowContainer + { + Direction = FlowDirection.VerticalOnly, + Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 }, + AutoSizeAxes = Axes.Both, + Children = new[] + { + title = new SpriteText + { + Font = @"Exo2.0-BoldItalic", + Text = beatmap.BeatmapSetInfo.Metadata.Title, + TextSize = 22, + Shadow = true, + }, + artist = new SpriteText + { + Margin = new MarginPadding { Top = -1 }, + Font = @"Exo2.0-SemiBoldItalic", + Text = beatmap.BeatmapSetInfo.Metadata.Artist, + TextSize = 17, + Shadow = true, + }, + new FlowContainer + { + Margin = new MarginPadding { Top = 5 }, + AutoSizeAxes = Axes.Both, + Children = new[] + { + new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(159, 198, 0, 255)), + new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(246, 101, 166, 255)), + } + } + } + } + }; } protected override void LoadComplete() @@ -81,8 +81,8 @@ namespace osu.Game.Beatmaps.Drawables { base.Selected(); GainedSelection?.Invoke(this); - } - + } + [BackgroundDependencyLoader] private void load(OsuConfigManager config) { @@ -90,31 +90,32 @@ namespace osu.Game.Beatmaps.Drawables preferUnicode = config.GetBindable(OsuConfig.ShowUnicode); preferUnicode.ValueChanged += preferUnicode_changed; - preferUnicode_changed(preferUnicode, null); + preferUnicode_changed(preferUnicode, null); } - private void preferUnicode_changed(object sender, EventArgs e) - { - title.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Title, beatmap.BeatmapSetInfo.Metadata.TitleUnicode); - artist.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Artist, beatmap.BeatmapSetInfo.Metadata.ArtistUnicode); + + private void preferUnicode_changed(object sender, EventArgs e) + { + title.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Title, beatmap.BeatmapSetInfo.Metadata.TitleUnicode); + artist.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Artist, beatmap.BeatmapSetInfo.Metadata.ArtistUnicode); } protected override void Dispose(bool isDisposing) - { - if (preferUnicode != null) + { + if (preferUnicode != null) preferUnicode.ValueChanged -= preferUnicode_changed; base.Dispose(isDisposing); - } - + } + class PanelBackground : BufferedContainer - { - private readonly WorkingBeatmap working; - - public PanelBackground(WorkingBeatmap working) - { - this.working = working; - - CacheDrawnFrameBuffer = true; - + { + private readonly WorkingBeatmap working; + + public PanelBackground(WorkingBeatmap working) + { + this.working = working; + + CacheDrawnFrameBuffer = true; + Children = new[] { new FlowContainer @@ -128,34 +129,34 @@ namespace osu.Game.Beatmaps.Drawables Children = new[] { // The left half with no gradient applied - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.Black, - Width = 0.4f, + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Black, + Width = 0.4f, }, // Piecewise-linear gradient with 3 segments to make it appear smoother new Box { RelativeSizeAxes = Axes.Both, - ColourInfo = ColourInfo.GradientHorizontal(Color4.Black, new Color4(0f, 0f, 0f, 0.9f)), + ColourInfo = OsuColor.BeatmapHeaderBackgroundA, Width = 0.05f, }, new Box { RelativeSizeAxes = Axes.Both, - ColourInfo = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.9f), new Color4(0f, 0f, 0f, 0.1f)), + ColourInfo = OsuColor.BeatmapHeaderBackgroundB, Width = 0.2f, }, new Box { RelativeSizeAxes = Axes.Both, - ColourInfo = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.1f), new Color4(0, 0, 0, 0)), + ColourInfo = OsuColor.BeatmapHeaderBackgroundC, Width = 0.05f, }, } - }, - }; + }, + }; } [BackgroundDependencyLoader] @@ -172,6 +173,6 @@ namespace osu.Game.Beatmaps.Drawables ForceRedraw(); }); } - } + } } } \ No newline at end of file diff --git a/osu.Game/Beatmaps/Drawables/Panel.cs b/osu.Game/Beatmaps/Drawables/Panel.cs index f97a5260d8..94fc3e8aae 100644 --- a/osu.Game/Beatmaps/Drawables/Panel.cs +++ b/osu.Game/Beatmaps/Drawables/Panel.cs @@ -8,6 +8,7 @@ using osu.Framework.Graphics.Transformations; using osu.Framework.Input; using OpenTK; using OpenTK.Graphics; +using osu.Game.Graphics; namespace osu.Game.Beatmaps.Drawables { @@ -35,7 +36,7 @@ namespace osu.Game.Beatmaps.Drawables RelativeSizeAxes = Axes.Both, Masking = true, CornerRadius = 10, - BorderColour = new Color4(221, 255, 255, 255), + BorderColour = OsuColor.PanelBorder, }); } @@ -84,7 +85,7 @@ namespace osu.Game.Beatmaps.Drawables nestedContainer.EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Glow, - Colour = new Color4(130, 204, 255, 150), + Colour = OsuColor.PanelGlowSelected, Radius = 20, Roundness = 10, }; @@ -98,7 +99,7 @@ namespace osu.Game.Beatmaps.Drawables Type = EdgeEffectType.Shadow, Offset = new Vector2(1), Radius = 10, - Colour = new Color4(0, 0, 0, 100), + Colour = OsuColor.PanelGlowUnselected, }; } diff --git a/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs b/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs index 83cd60eca3..2a30900f16 100644 --- a/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs +++ b/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.IO; using osu.Game.Modes.Objects; using OpenTK.Graphics; +using osu.Game.Graphics; namespace osu.Game.Beatmaps.Formats { @@ -44,11 +45,11 @@ namespace osu.Game.Beatmaps.Formats public virtual void ApplyColours(Beatmap b) { - List colours = b.ComboColors ?? new List() { - new Color4(17, 136, 170, 255), - new Color4(102,136,0, 255), - new Color4(204,102,0, 255), - new Color4(121,9,13, 255), + List colours = b.ComboColors ?? new List { + OsuColor.Combo1, + OsuColor.Combo2, + OsuColor.Combo3, + OsuColor.Combo4, }; if (colours.Count == 0) return; diff --git a/osu.Game/Graphics/OsuColor.cs b/osu.Game/Graphics/OsuColor.cs new file mode 100644 index 0000000000..e516b38983 --- /dev/null +++ b/osu.Game/Graphics/OsuColor.cs @@ -0,0 +1,62 @@ +using System; +using OpenTK.Graphics; +using osu.Framework.Graphics.Colour; + +namespace osu.Game.Graphics +{ + public static class OsuColor + { + public static readonly Color4 OsuPink = new Color4(255, 102, 170, 255); + + public static readonly Color4 BeatmapPanelUnselected = new Color4(20, 43, 51, 255); + public static readonly ColourInfo BeatmapPanelSelected = ColourInfo.GradientVertical( + new Color4(20, 43, 51, 255), + new Color4(40, 86, 102, 255)); + + public static readonly ColourInfo BeatmapHeaderBackgroundA = + ColourInfo.GradientHorizontal(Color4.Black, new Color4(0f, 0f, 0f, 0.9f)); + public static readonly ColourInfo BeatmapHeaderBackgroundB = + ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.9f), new Color4(0f, 0f, 0f, 0.1f)); + public static readonly ColourInfo BeatmapHeaderBackgroundC = + ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.1f), new Color4(0, 0, 0, 0)); + + public static readonly Color4 PanelBorder = new Color4(221, 255, 255, 255); + public static readonly Color4 PanelGlowSelected = new Color4(130, 204, 255, 150); + public static readonly Color4 PanelGlowUnselected = new Color4(0, 0, 0, 100); + + public static readonly Color4 Combo1 = new Color4(17, 136, 170, 255); + public static readonly Color4 Combo2 = new Color4(102, 136, 0, 255); + public static readonly Color4 Combo3 = new Color4(204, 102, 0, 255); + public static readonly Color4 Combo4 = new Color4(121, 9, 13, 255); + + public static readonly Color4 BackButtonLeft = new Color4(195, 40, 140, 255); + public static readonly Color4 BackButtonRight = new Color4(238, 51, 153, 255); + + public static readonly Color4 Button = new Color4(14, 132, 165, 255); + + public static readonly Color4 PlayButton = new Color4(238, 51, 153, 255); + + public static readonly Color4 MusicControllerBackground = new Color4(150, 150, 150, 255); + public static readonly Color4 MusicControllerProgress = new Color4(255, 204, 34, 255); + + public static readonly Color4 CheckBoxHover = new Color4(255, 221, 238, 255); + public static readonly Color4 CheckBoxGlow = new Color4(187, 17, 119, 0); + + public static readonly Color4 DropDownBackground = new Color4(0, 0, 0, 128); + public static readonly Color4 DropDownHover = new Color4(187, 17, 119, 255); + + public static readonly Color4 OptionSectionHeader = new Color4(247, 198, 35, 255); + + public static readonly Color4 SidebarButtonBackground = new Color4(60, 60, 60, 255); + public static readonly Color4 SidebarButtonSelectionIndicator = new Color4(247, 198, 35, 255); + + public static readonly Color4 SliderbarBackground = new Color4(255, 102, 170, 255); + public static readonly Color4 SliderbarNub = new Color4(255, 102, 170, 255); + + public static readonly Color4 ToolbarModeButtonIcon = new Color4(255, 194, 224, 255); + public static readonly Color4 ToolbarModeButtonIconActiveGlow = new Color4(255, 194, 224, 100); + + public static readonly Color4 BeatmapInfoWedgeBorder = new Color4(221, 255, 255, 255); + public static readonly Color4 BeatmapInfoWedgeGlow = new Color4(130, 204, 255, 150); + } +} \ No newline at end of file diff --git a/osu.Game/Graphics/UserInterface/BackButton.cs b/osu.Game/Graphics/UserInterface/BackButton.cs index ade6cedc58..3203240581 100644 --- a/osu.Game/Graphics/UserInterface/BackButton.cs +++ b/osu.Game/Graphics/UserInterface/BackButton.cs @@ -46,7 +46,7 @@ namespace osu.Game.Graphics.UserInterface leftBox = new Box { RelativeSizeAxes = Axes.Both, - Colour = new Color4(195, 40, 140, 255), + Colour = OsuColor.BackButtonLeft, Shear = new Vector2(shear, 0), }, icon = new TextAwesome @@ -67,7 +67,7 @@ namespace osu.Game.Graphics.UserInterface { rightBox = new Box { - Colour = new Color4(238, 51, 153, 255), + Colour = OsuColor.BackButtonRight, Origin = Anchor.TopLeft, Anchor = Anchor.TopLeft, RelativeSizeAxes = Axes.Both, diff --git a/osu.Game/Graphics/UserInterface/OsuButton.cs b/osu.Game/Graphics/UserInterface/OsuButton.cs index 476895e0b2..48922de6ae 100644 --- a/osu.Game/Graphics/UserInterface/OsuButton.cs +++ b/osu.Game/Graphics/UserInterface/OsuButton.cs @@ -12,7 +12,7 @@ namespace osu.Game.Graphics.UserInterface public OsuButton() { Height = 25; - Colour = new Color4(14, 132, 165, 255); + Colour = OsuColor.Button; } } } \ No newline at end of file diff --git a/osu.Game/Modes/Objects/HitObject.cs b/osu.Game/Modes/Objects/HitObject.cs index 71839e7036..dbf95d658c 100644 --- a/osu.Game/Modes/Objects/HitObject.cs +++ b/osu.Game/Modes/Objects/HitObject.cs @@ -4,6 +4,7 @@ using osu.Game.Beatmaps; using osu.Game.Beatmaps.Samples; using OpenTK.Graphics; +using osu.Game.Graphics; namespace osu.Game.Modes.Objects { @@ -17,7 +18,7 @@ namespace osu.Game.Modes.Objects public bool NewCombo { get; set; } - public Color4 Colour = new Color4(17, 136, 170, 255); + public Color4 Colour = OsuColor.Combo1; public double Duration => EndTime - StartTime; diff --git a/osu.Game/Online/Chat/Drawables/ChatLine.cs b/osu.Game/Online/Chat/Drawables/ChatLine.cs index 454f7beed7..2dd3425bda 100644 --- a/osu.Game/Online/Chat/Drawables/ChatLine.cs +++ b/osu.Game/Online/Chat/Drawables/ChatLine.cs @@ -35,7 +35,7 @@ namespace osu.Game.Online.Chat.Drawables { Text = Message.Timestamp.LocalDateTime.ToLongTimeString(), TextSize = text_size, - Colour = new Color4(128, 128, 128, 255) + Colour = Color4.Gray }, new SpriteText { diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 449d588f26..0ef986a4e6 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -171,7 +171,7 @@ namespace osu.Game.Overlays Origin = Anchor.BottomCentre, Anchor = Anchor.BottomCentre, Height = 10, - Colour = new Color4(255, 204, 34, 255), + Colour = OsuColor.MusicControllerProgress, SeekRequested = seek } }; @@ -393,7 +393,7 @@ namespace osu.Game.Overlays { sprite = new Sprite { - Colour = new Color4(150, 150, 150, 255), + Colour = OsuColor.MusicControllerBackground, FillMode = FillMode.Fill, }, new Box diff --git a/osu.Game/Overlays/Options/CheckBoxOption.cs b/osu.Game/Overlays/Options/CheckBoxOption.cs index 2ea176378c..f50fed844a 100644 --- a/osu.Game/Overlays/Options/CheckBoxOption.cs +++ b/osu.Game/Overlays/Options/CheckBoxOption.cs @@ -16,6 +16,7 @@ using osu.Framework.Graphics.UserInterface; using OpenTK; using OpenTK.Graphics; using osu.Framework.Input; +using osu.Game.Graphics; namespace osu.Game.Overlays.Options { @@ -141,21 +142,17 @@ namespace osu.Game.Overlays.Options const float border_width = 3; - Color4 hoverColour = new Color4(255, 221, 238, 255); - Color4 defaultColour = new Color4(255, 102, 170, 255); - Color4 glowColour = new Color4(187, 17, 119, 0); - public Light() { Size = new Vector2(40, 12); Masking = true; - Colour = defaultColour; + Colour = OsuColor.OsuPink; EdgeEffect = new EdgeEffect { - Colour = glowColour, + Colour = OsuColor.CheckBoxGlow, Type = EdgeEffectType.Glow, Radius = 10, Roundness = 8, @@ -182,13 +179,13 @@ namespace osu.Game.Overlays.Options { if (value) { - FadeColour(hoverColour, 500, EasingTypes.OutQuint); + FadeColour(OsuColor.CheckBoxHover, 500, EasingTypes.OutQuint); FadeGlowTo(1, 500, EasingTypes.OutQuint); } else { FadeGlowTo(0, 500); - FadeColour(defaultColour, 500); + FadeColour(OsuColor.OsuPink, 500); } } } diff --git a/osu.Game/Overlays/Options/DropdownOption.cs b/osu.Game/Overlays/Options/DropdownOption.cs index e843e15993..aa552d788d 100644 --- a/osu.Game/Overlays/Options/DropdownOption.cs +++ b/osu.Game/Overlays/Options/DropdownOption.cs @@ -131,8 +131,8 @@ namespace osu.Game.Overlays.Options private class StyledDropDownComboBox : DropDownComboBox { - protected override Color4 BackgroundColour => new Color4(0, 0, 0, 128); - protected override Color4 BackgroundColourHover => new Color4(187, 17, 119, 255); + protected override Color4 BackgroundColour => OsuColor.DropDownBackground; + protected override Color4 BackgroundColourHover => OsuColor.DropDownHover; private SpriteText label; protected override string Label @@ -161,9 +161,9 @@ namespace osu.Game.Overlays.Options private class StyledDropDownMenuItem : DropDownMenuItem { - protected override Color4 BackgroundColour => new Color4(0, 0, 0, 128); - protected override Color4 BackgroundColourSelected => new Color4(0, 0, 0, 128); - protected override Color4 BackgroundColourHover => new Color4(187, 17, 119, 255); + protected override Color4 BackgroundColour => OsuColor.DropDownBackground; + protected override Color4 BackgroundColourSelected => OsuColor.DropDownBackground; + protected override Color4 BackgroundColourHover => OsuColor.DropDownHover; public StyledDropDownMenuItem(string text, U value) : base(text, value) { diff --git a/osu.Game/Overlays/Options/OptionsSection.cs b/osu.Game/Overlays/Options/OptionsSection.cs index 256d5c8218..9e23e72d61 100644 --- a/osu.Game/Overlays/Options/OptionsSection.cs +++ b/osu.Game/Overlays/Options/OptionsSection.cs @@ -51,7 +51,7 @@ namespace osu.Game.Overlays.Options new SpriteText { TextSize = headerSize, - Colour = new Color4(247, 198, 35, 255), + Colour = OsuColor.OptionSectionHeader, Text = Header, }, content = new FlowContainer diff --git a/osu.Game/Overlays/Options/SidebarButton.cs b/osu.Game/Overlays/Options/SidebarButton.cs index a1edc997a1..76af193691 100644 --- a/osu.Game/Overlays/Options/SidebarButton.cs +++ b/osu.Game/Overlays/Options/SidebarButton.cs @@ -59,7 +59,7 @@ namespace osu.Game.Overlays.Options { RelativeSizeAxes = Axes.Both, BlendingMode = BlendingMode.Additive, - Colour = new Color4(60, 60, 60, 255), + Colour = OsuColor.SidebarButtonBackground, Alpha = 0, }, new Container @@ -88,7 +88,7 @@ namespace osu.Game.Overlays.Options Width = 5, Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, - Colour = new Color4(247, 198, 35, 255) + Colour = OsuColor.SidebarButtonSelectionIndicator } }; } diff --git a/osu.Game/Overlays/Options/SliderOption.cs b/osu.Game/Overlays/Options/SliderOption.cs index 44b7935945..ff0e8318d8 100644 --- a/osu.Game/Overlays/Options/SliderOption.cs +++ b/osu.Game/Overlays/Options/SliderOption.cs @@ -16,6 +16,7 @@ using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.UserInterface; using osu.Framework.Input; +using osu.Game.Graphics; namespace osu.Game.Overlays.Options { @@ -84,7 +85,7 @@ namespace osu.Game.Overlays.Options RelativeSizeAxes = Axes.None, Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, - Colour = new Color4(255, 102, 170, 255), + Colour = OsuColor.OsuPink, }, rightBox = new Box { @@ -92,7 +93,7 @@ namespace osu.Game.Overlays.Options RelativeSizeAxes = Axes.None, Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, - Colour = new Color4(255, 102, 170, 255), + Colour = OsuColor.SliderbarBackground, Alpha = 0.5f, }, nub = new Container @@ -104,13 +105,14 @@ namespace osu.Game.Overlays.Options AutoSizeAxes = Axes.None, RelativeSizeAxes = Axes.None, Masking = true, - BorderColour = new Color4(255, 102, 170, 255), + BorderColour = OsuColor.SliderbarNub, BorderThickness = 3, Children = new[] { new Box { - Colour = new Color4(255, 102, 170, 0), + Colour = new Color4(OsuColor.SliderbarNub.R, + OsuColor.SliderbarNub.G, OsuColor.SliderbarNub.B, 0), RelativeSizeAxes = Axes.Both } } diff --git a/osu.Game/Overlays/OptionsOverlay.cs b/osu.Game/Overlays/OptionsOverlay.cs index 33677799f1..fb4bdb35d0 100644 --- a/osu.Game/Overlays/OptionsOverlay.cs +++ b/osu.Game/Overlays/OptionsOverlay.cs @@ -23,6 +23,7 @@ using osu.Game.Overlays.Options.Graphics; using osu.Game.Overlays.Options.Input; using osu.Game.Overlays.Options.Online; using System; +using osu.Game.Graphics; namespace osu.Game.Overlays { @@ -94,7 +95,7 @@ namespace osu.Game.Overlays }, new SpriteText { - Colour = new Color4(255, 102, 170, 255), + Colour = OsuColor.OsuPink, Text = "Change the way osu! behaves", TextSize = 18, Margin = new MarginPadding { Left = CONTENT_MARGINS, Bottom = 30 }, diff --git a/osu.Game/Overlays/Toolbar/ToolbarModeButton.cs b/osu.Game/Overlays/Toolbar/ToolbarModeButton.cs index 60ce228164..3f88349f00 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarModeButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarModeButton.cs @@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Toolbar DrawableIcon.EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Glow, - Colour = new Color4(255, 194, 224, 100), + Colour = OsuColor.ToolbarModeButtonIconActiveGlow, Radius = 15, Roundness = 15, }; @@ -43,7 +43,7 @@ namespace osu.Game.Overlays.Toolbar else { DrawableIcon.Masking = false; - DrawableIcon.Colour = new Color4(255, 194, 224, 255); + DrawableIcon.Colour = OsuColor.ToolbarModeButtonIcon; } } } diff --git a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs index 22c214d82f..2405705d1b 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs @@ -13,6 +13,7 @@ using osu.Game.Graphics.Backgrounds; using osu.Game.Modes; using OpenTK; using OpenTK.Graphics; +using osu.Game.Graphics; namespace osu.Game.Overlays.Toolbar { @@ -52,7 +53,7 @@ namespace osu.Game.Overlays.Toolbar EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Glow, - Colour = new Color4(255, 194, 224, 100), + Colour = OsuColor.ToolbarModeButtonIconActiveGlow, Radius = 15, Roundness = 15, }, diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 81cd55d429..eb176f4bdd 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -14,6 +14,7 @@ using osu.Game.Beatmaps; using osu.Game.Database; using osu.Framework.Graphics.Colour; using osu.Game.Beatmaps.Drawables; +using osu.Game.Graphics; namespace osu.Game.Screens.Select { @@ -29,12 +30,12 @@ namespace osu.Game.Screens.Select { Shear = wedged_container_shear; Masking = true; - BorderColour = new Color4(221, 255, 255, 255); + BorderColour = OsuColor.BeatmapInfoWedgeBorder; BorderThickness = 2.5f; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Glow, - Colour = new Color4(130, 204, 255, 150), + Colour = OsuColor.BeatmapInfoWedgeGlow, Radius = 20, Roundness = 15, }; diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index 3a74c42029..b14e959755 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -30,6 +30,7 @@ using osu.Game.Beatmaps.Drawables; using osu.Game.Graphics.Containers; using osu.Framework.Input; using OpenTK.Input; +using osu.Game.Graphics; namespace osu.Game.Screens.Select { @@ -142,7 +143,7 @@ namespace osu.Game.Screens.Select RelativeSizeAxes = Axes.Y, Width = 100, Text = "Play", - Colour = new Color4(238, 51, 153, 255), + Colour = OsuColor.PlayButton, Action = start }, } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index a15cd5db7d..78c78fd5a8 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -231,6 +231,7 @@ +