1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-23 08:27:23 +08:00

More osu!-side bindable fixes

This commit is contained in:
smoogipoo 2018-01-10 15:41:13 +09:00
parent 9eb4eb4b36
commit 17e7f75aca
5 changed files with 7 additions and 7 deletions

View File

@ -103,7 +103,7 @@ namespace osu.Game.Tests.Visual
}
private class TestSliderBar<T> : OsuSliderBar<T>
where T : struct, IEquatable<T>
where T : struct, IEquatable<T>, IComparable, IConvertible
{
public TestSliderBar()
{

View File

@ -152,7 +152,7 @@ namespace osu.Game.Tests.Visual
}
private class TestSliderBar<T> : OsuSliderBar<T>
where T : struct, IEquatable<T>
where T : struct, IEquatable<T>, IComparable, IConvertible
{
public TestSliderBar()
{

View File

@ -18,7 +18,7 @@ using osu.Framework.Graphics.Shapes;
namespace osu.Game.Graphics.UserInterface
{
public class OsuSliderBar<T> : SliderBar<T>, IHasTooltip, IHasAccentColour
where T : struct, IEquatable<T>
where T : struct, IEquatable<T>, IComparable, IConvertible
{
private SampleChannel sample;
private double lastSampleTime;
@ -69,7 +69,7 @@ namespace osu.Game.Graphics.UserInterface
if (bindableInt != null)
return bindableInt.Value.ToString("N0");
return Current.Value.ToString();
return Current.Value.ToString(CultureInfo.InvariantCulture);
}
}

View File

@ -10,12 +10,12 @@ using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings
{
public class SettingsSlider<T> : SettingsSlider<T, OsuSliderBar<T>>
where T : struct, IEquatable<T>
where T : struct, IEquatable<T>, IComparable, IConvertible
{
}
public class SettingsSlider<T, U> : SettingsItem<T>
where T : struct, IEquatable<T>
where T : struct, IEquatable<T>, IComparable, IConvertible
where U : OsuSliderBar<T>, new()
{
protected override Drawable CreateControl() => new U

View File

@ -11,7 +11,7 @@ using osu.Game.Overlays.Settings;
namespace osu.Game.Screens.Play.ReplaySettings
{
public class ReplaySliderBar<T> : SettingsSlider<T>
where T : struct, IEquatable<T>
where T : struct, IEquatable<T>, IComparable, IConvertible
{
protected override Drawable CreateControl() => new Sliderbar
{