Convert data type of DistanceSpacing to float

This commit is contained in:
Salman Ahmed
2022-04-28 10:24:36 +03:00
parent 2e8372fe90
commit 7aaa88cac2
13 changed files with 21 additions and 24 deletions

View File

@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
{
Children = new Drawable[]
{
new SettingsSlider<float, SizeSlider<float>>
new SettingsSlider<float, SizeSlider>
{
LabelText = SkinSettingsStrings.GameplayCursorSize,
Current = config.GetBindable<float>(OsuSetting.GameplayCursorSize),

View File

@ -1,8 +1,6 @@
// 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.
using System;
using System.Globalization;
using osu.Framework.Localisation;
using osu.Game.Graphics.UserInterface;
@ -11,9 +9,8 @@ namespace osu.Game.Overlays.Settings.Sections
/// <summary>
/// A slider intended to show a "size" multiplier number, where 1x is 1.0.
/// </summary>
public class SizeSlider<T> : OsuSliderBar<T>
where T : struct, IEquatable<T>, IComparable<T>, IConvertible, IFormattable
internal class SizeSlider : OsuSliderBar<float>
{
public override LocalisableString TooltipText => Current.Value.ToString(@"0.##x", NumberFormatInfo.CurrentInfo);
public override LocalisableString TooltipText => Current.Value.ToString(@"0.##x");
}
}

View File

@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
LabelText = UserInterfaceStrings.CursorRotation,
Current = config.GetBindable<bool>(OsuSetting.CursorRotation)
},
new SettingsSlider<float, SizeSlider<float>>
new SettingsSlider<float, SizeSlider>
{
LabelText = UserInterfaceStrings.MenuCursorSize,
Current = config.GetBindable<float>(OsuSetting.MenuCursorSize),