osu/osu.Game/Overlays/Settings/SettingsSlider.cs

27 lines
806 B
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2016-12-14 19:59:23 +00:00
using System;
using osu.Framework.Graphics;
2017-04-21 11:59:04 +00:00
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings
2016-12-07 20:39:21 +00:00
{
public class SettingsSlider<T> : SettingsSlider<T, OsuSliderBar<T>>
where T : struct, IEquatable<T>
2016-12-07 20:39:21 +00:00
{
2017-04-21 11:59:04 +00:00
}
public class SettingsSlider<T, U> : SettingsItem<T>
where T : struct, IEquatable<T>
2017-05-02 09:53:33 +00:00
where U : SliderBar<T>, new()
2017-04-21 11:59:04 +00:00
{
protected override Drawable CreateControl() => new U()
2016-12-07 20:39:21 +00:00
{
Margin = new MarginPadding { Top = 5, Bottom = 5 },
RelativeSizeAxes = Axes.X
};
2016-12-07 20:39:21 +00:00
}
2016-12-09 13:18:58 +00:00
}