1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 17:27:39 +08:00
osu-lazer/osu.Game/Overlays/Options/OptionSlider.cs
Dean Herbert 153951d3dd Add OptionItem class
Allow for centalised logic for all option UI controls.
2017-05-04 23:07:48 +09:00

31 lines
945 B
C#

// 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.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options
{
public class OptionSlider<T> : OptionSlider<T, OsuSliderBar<T>>
where T : struct
{
}
public class OptionSlider<T, U> : OptionItem<T>
where T : struct
where U : SliderBar<T>, new()
{
protected override Drawable CreateControl() => new U()
{
Margin = new MarginPadding { Top = 5, Bottom = 5 },
RelativeSizeAxes = Axes.X
};
}
}