2019-01-24 08:43:03 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2017-05-30 08:02:04 +00:00
|
|
|
using System;
|
2018-01-13 19:25:09 +00:00
|
|
|
using osu.Framework.Allocation;
|
2017-05-30 08:02:04 +00:00
|
|
|
using osu.Framework.Graphics;
|
2018-01-13 19:25:09 +00:00
|
|
|
using osu.Game.Graphics;
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2017-05-30 08:02:04 +00:00
|
|
|
using osu.Game.Overlays.Settings;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2018-01-13 19:25:09 +00:00
|
|
|
namespace osu.Game.Screens.Play.PlayerSettings
|
2017-05-30 08:02:04 +00:00
|
|
|
{
|
2018-01-13 19:25:09 +00:00
|
|
|
public class PlayerSliderBar<T> : SettingsSlider<T>
|
2019-10-23 05:04:06 +00:00
|
|
|
where T : struct, IEquatable<T>, IComparable<T>, IConvertible
|
2017-05-30 08:02:04 +00:00
|
|
|
{
|
2018-02-07 04:26:41 +00:00
|
|
|
public OsuSliderBar<T> Bar => (OsuSliderBar<T>)Control;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2022-03-03 08:07:46 +00:00
|
|
|
protected override Drawable CreateControl() => new SliderBar();
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2022-03-03 08:07:46 +00:00
|
|
|
protected class SliderBar : OsuSliderBar<T>
|
2017-05-30 08:02:04 +00:00
|
|
|
{
|
2022-03-03 08:07:46 +00:00
|
|
|
public SliderBar()
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.X;
|
|
|
|
}
|
|
|
|
|
2017-05-30 08:02:04 +00:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
{
|
|
|
|
AccentColour = colours.Yellow;
|
|
|
|
Nub.AccentColour = colours.Yellow;
|
|
|
|
Nub.GlowingAccentColour = colours.YellowLighter;
|
2021-10-15 03:35:19 +00:00
|
|
|
Nub.GlowColour = colours.YellowDark;
|
2017-05-30 08:02:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|