Make replay settings match design colours.

This commit is contained in:
smoogipooo 2017-05-30 17:02:04 +09:00
parent c8066cfde9
commit 72fa50f944
6 changed files with 62 additions and 4 deletions

View File

@ -33,7 +33,7 @@ namespace osu.Desktop.VisualTests.Tests
Text = @"Button", Text = @"Button",
})); }));
AddStep(@"Add checkbox", () => container.Add(new SettingsCheckbox AddStep(@"Add checkbox", () => container.Add(new ReplaySettingsCheckbox
{ {
LabelText = "Checkbox", LabelText = "Checkbox",
})); }));

View File

@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play.ReplaySettings
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
new SettingsCheckbox new ReplaySettingsCheckbox
{ {
LabelText = "Show floating coments", LabelText = "Show floating coments",
Bindable = config.GetBindable<bool>(OsuSetting.FloatingComments) Bindable = config.GetBindable<bool>(OsuSetting.FloatingComments)

View File

@ -6,6 +6,7 @@ using osu.Game.Configuration;
using osu.Game.Overlays.Settings; using osu.Game.Overlays.Settings;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Screens.Play.ReplaySettings namespace osu.Game.Screens.Play.ReplaySettings
{ {
@ -18,10 +19,10 @@ namespace osu.Game.Screens.Play.ReplaySettings
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
new SettingsSlider<double> new ReplaySettingsSliderBar<double>()
{ {
LabelText = "Playback speed", LabelText = "Playback speed",
Bindable = config.GetBindable<double>(OsuSetting.PlaybackSpeed), Bindable = config.GetBindable<double>(OsuSetting.PlaybackSpeed)
} }
}; };
} }

View File

@ -0,0 +1,20 @@
// 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.Game.Graphics.UserInterface;
namespace osu.Game.Screens.Play.ReplaySettings
{
public class ReplaySettingsCheckbox : OsuCheckbox
{
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
Nub.AccentColour = colours.Yellow;
Nub.GlowingAccentColour = colours.YellowLighter;
Nub.GlowColour = colours.YellowDarker;
}
}
}

View File

@ -0,0 +1,35 @@
// 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.UserInterface;
using System;
using osu.Game.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Input;
using osu.Game.Overlays.Settings;
namespace osu.Game.Screens.Play.ReplaySettings
{
public class ReplaySettingsSliderBar<T> : SettingsSlider<T>
where T : struct, IEquatable<T>
{
protected override Drawable CreateControl() => new Sliderbar()
{
Margin = new MarginPadding { Top = 5, Bottom = 5 },
RelativeSizeAxes = Axes.X
};
private class Sliderbar : OsuSliderBar<T>
{
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
AccentColour = colours.Yellow;
Nub.AccentColour = colours.Yellow;
Nub.GlowingAccentColour = colours.YellowLighter;
Nub.GlowColour = colours.YellowDarker;
}
}
}
}

View File

@ -245,7 +245,9 @@
<Compile Include="Screens\Play\ReplaySettings\DiscussionSettings.cs" /> <Compile Include="Screens\Play\ReplaySettings\DiscussionSettings.cs" />
<Compile Include="Graphics\UserInterface\SettingsDropdownContainer.cs" /> <Compile Include="Graphics\UserInterface\SettingsDropdownContainer.cs" />
<Compile Include="Screens\Play\ReplaySettings\ReplaySettingsOverlay.cs" /> <Compile Include="Screens\Play\ReplaySettings\ReplaySettingsOverlay.cs" />
<Compile Include="Screens\Play\ReplaySettings\ReplaySettingsSliderBar.cs" />
<Compile Include="Screens\Play\ReplaySettings\PlaybackSettings.cs" /> <Compile Include="Screens\Play\ReplaySettings\PlaybackSettings.cs" />
<Compile Include="Screens\Play\ReplaySettings\ReplaySettingsCheckbox.cs" />
<Compile Include="Screens\Play\PauseContainer.cs" /> <Compile Include="Screens\Play\PauseContainer.cs" />
<Compile Include="Screens\Play\SongProgressInfo.cs" /> <Compile Include="Screens\Play\SongProgressInfo.cs" />
<Compile Include="Screens\Play\HUD\ModDisplay.cs" /> <Compile Include="Screens\Play\HUD\ModDisplay.cs" />