2020-11-30 15:14:15 +08: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.
|
|
|
|
|
2022-04-29 13:02:07 +08:00
|
|
|
using System;
|
|
|
|
using System.Globalization;
|
2021-06-26 01:10:04 +08:00
|
|
|
using osu.Framework.Localisation;
|
2020-11-30 15:14:15 +08:00
|
|
|
using osu.Game.Graphics.UserInterface;
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Settings.Sections
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// A slider intended to show a "size" multiplier number, where 1x is 1.0.
|
|
|
|
/// </summary>
|
2022-04-29 13:02:07 +08:00
|
|
|
public class SizeSlider<T> : OsuSliderBar<T>
|
|
|
|
where T : struct, IEquatable<T>, IComparable<T>, IConvertible, IFormattable
|
2020-11-30 15:14:15 +08:00
|
|
|
{
|
2022-04-29 13:02:07 +08:00
|
|
|
public override LocalisableString TooltipText => Current.Value.ToString(@"0.##x", NumberFormatInfo.CurrentInfo);
|
2020-11-30 15:14:15 +08:00
|
|
|
}
|
|
|
|
}
|