mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 02:57:25 +08:00
Make replay settings match design colours.
This commit is contained in:
parent
c8066cfde9
commit
72fa50f944
@ -33,7 +33,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Text = @"Button",
|
||||
}));
|
||||
|
||||
AddStep(@"Add checkbox", () => container.Add(new SettingsCheckbox
|
||||
AddStep(@"Add checkbox", () => container.Add(new ReplaySettingsCheckbox
|
||||
{
|
||||
LabelText = "Checkbox",
|
||||
}));
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play.ReplaySettings
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SettingsCheckbox
|
||||
new ReplaySettingsCheckbox
|
||||
{
|
||||
LabelText = "Show floating coments",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.FloatingComments)
|
||||
|
@ -6,6 +6,7 @@ using osu.Game.Configuration;
|
||||
using osu.Game.Overlays.Settings;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Screens.Play.ReplaySettings
|
||||
{
|
||||
@ -18,10 +19,10 @@ namespace osu.Game.Screens.Play.ReplaySettings
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SettingsSlider<double>
|
||||
new ReplaySettingsSliderBar<double>()
|
||||
{
|
||||
LabelText = "Playback speed",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.PlaybackSpeed),
|
||||
Bindable = config.GetBindable<double>(OsuSetting.PlaybackSpeed)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -245,7 +245,9 @@
|
||||
<Compile Include="Screens\Play\ReplaySettings\DiscussionSettings.cs" />
|
||||
<Compile Include="Graphics\UserInterface\SettingsDropdownContainer.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\ReplaySettingsCheckbox.cs" />
|
||||
<Compile Include="Screens\Play\PauseContainer.cs" />
|
||||
<Compile Include="Screens\Play\SongProgressInfo.cs" />
|
||||
<Compile Include="Screens\Play\HUD\ModDisplay.cs" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user