1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 13:22:55 +08:00

Add central color class

I didn't move _every_ color here, but most of them. The ones I left
behind are mostly just shades of gray.

Closes #126
This commit is contained in:
Drew DeVault 2017-01-09 17:18:47 -05:00
parent 4899d88d19
commit 70ecf48ca7
21 changed files with 312 additions and 246 deletions

View File

@ -1,72 +1,68 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//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 <contact@ppy.sh>.
//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<BeatmapPanel> GainedSelection;
public Action<BeatmapPanel> 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 }
}
}
}
}
};
}
}
}
}
}

View File

@ -1,74 +1,74 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//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 <contact@ppy.sh>.
//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<BeatmapSetHeader> GainedSelection;
private SpriteText title, artist;
private OsuConfigManager config;
private Bindable<bool> preferUnicode;
private WorkingBeatmap beatmap;
public BeatmapSetHeader(WorkingBeatmap beatmap)
{
this.beatmap = beatmap;
Children = new Drawable[]
{
class BeatmapSetHeader : Panel
{
public Action<BeatmapSetHeader> GainedSelection;
private SpriteText title, artist;
private OsuConfigManager config;
private Bindable<bool> 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<bool>(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();
});
}
}
}
}
}

View File

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

View File

@ -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<Color4> colours = b.ComboColors ?? new List<Color4>() {
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<Color4> colours = b.ComboColors ?? new List<Color4> {
OsuColor.Combo1,
OsuColor.Combo2,
OsuColor.Combo3,
OsuColor.Combo4,
};
if (colours.Count == 0) return;

View File

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

View File

@ -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,

View File

@ -12,7 +12,7 @@ namespace osu.Game.Graphics.UserInterface
public OsuButton()
{
Height = 25;
Colour = new Color4(14, 132, 165, 255);
Colour = OsuColor.Button;
}
}
}

View File

@ -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;

View File

@ -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
{

View File

@ -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

View File

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

View File

@ -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<U> : DropDownMenuItem<U>
{
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)
{

View File

@ -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

View File

@ -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
}
};
}

View File

@ -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
}
}

View File

@ -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 },

View File

@ -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;
}
}
}

View File

@ -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,
},

View File

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

View File

@ -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
},
}

View File

@ -231,6 +231,7 @@
<Compile Include="Configuration\ScreenshotFormat.cs" />
<Compile Include="Configuration\FrameSync.cs" />
<Compile Include="Configuration\ConfineMouseMode.cs" />
<Compile Include="Graphics\OsuColor.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\osu-framework\osu.Framework\osu.Framework.csproj">