mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Make replay settings match design colours.
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user