1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Rename NormalSliderBar.cs to RoundedSliderBar.cs

This commit is contained in:
mk56-spn 2023-02-02 17:24:45 +01:00
parent 7c5a65bdb7
commit 3f0ce75bf5
19 changed files with 27 additions and 27 deletions

View File

@ -48,7 +48,7 @@ namespace osu.Game.Rulesets.Mania
}; };
} }
private partial class ManiaScrollSlider : NormalSliderBar<double> private partial class ManiaScrollSlider : RoundedSliderBar<double>
{ {
public override LocalisableString TooltipText => RulesetSettingsStrings.ScrollSpeedTooltip(Current.Value, (int)Math.Round(DrawableManiaRuleset.MAX_TIME_RANGE / Current.Value)); public override LocalisableString TooltipText => RulesetSettingsStrings.ScrollSpeedTooltip(Current.Value, (int)Math.Round(DrawableManiaRuleset.MAX_TIME_RANGE / Current.Value));
} }

View File

@ -31,8 +31,8 @@ namespace osu.Game.Tests.Visual.Audio
private WaveformTestBeatmap beatmap; private WaveformTestBeatmap beatmap;
private NormalSliderBar<int> lowPassSlider; private RoundedSliderBar<int> lowPassSlider;
private NormalSliderBar<int> highPassSlider; private RoundedSliderBar<int> highPassSlider;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(AudioManager audio) private void load(AudioManager audio)
@ -52,7 +52,7 @@ namespace osu.Game.Tests.Visual.Audio
Text = $"Low Pass: {lowPassFilter.Cutoff}hz", Text = $"Low Pass: {lowPassFilter.Cutoff}hz",
Font = new FontUsage(size: 40) Font = new FontUsage(size: 40)
}, },
lowPassSlider = new NormalSliderBar<int> lowPassSlider = new RoundedSliderBar<int>
{ {
Width = 500, Width = 500,
Height = 50, Height = 50,
@ -69,7 +69,7 @@ namespace osu.Game.Tests.Visual.Audio
Text = $"High Pass: {highPassFilter.Cutoff}hz", Text = $"High Pass: {highPassFilter.Cutoff}hz",
Font = new FontUsage(size: 40) Font = new FontUsage(size: 40)
}, },
highPassSlider = new NormalSliderBar<int> highPassSlider = new RoundedSliderBar<int>
{ {
Width = 500, Width = 500,
Height = 50, Height = 50,

View File

@ -261,7 +261,7 @@ namespace osu.Game.Tests.Visual.UserInterface
{ {
AddStep($"Set {name} slider to {value}", () => AddStep($"Set {name} slider to {value}", () =>
this.ChildrenOfType<DifficultyAdjustSettingsControl>().First(c => c.LabelText == name) this.ChildrenOfType<DifficultyAdjustSettingsControl>().First(c => c.LabelText == name)
.ChildrenOfType<NormalSliderBar<float>>().First().Current.Value = value); .ChildrenOfType<RoundedSliderBar<float>>().First().Current.Value = value);
} }
private void checkBindableAtValue(string name, float? expectedValue) private void checkBindableAtValue(string name, float? expectedValue)
@ -275,7 +275,7 @@ namespace osu.Game.Tests.Visual.UserInterface
{ {
AddAssert($"Slider {name} at {expectedValue}", () => AddAssert($"Slider {name} at {expectedValue}", () =>
this.ChildrenOfType<DifficultyAdjustSettingsControl>().First(c => c.LabelText == name) this.ChildrenOfType<DifficultyAdjustSettingsControl>().First(c => c.LabelText == name)
.ChildrenOfType<NormalSliderBar<float>>().First().Current.Value == expectedValue); .ChildrenOfType<RoundedSliderBar<float>>().First().Current.Value == expectedValue);
} }
private void setBeatmapWithDifficultyParameters(float value) private void setBeatmapWithDifficultyParameters(float value)

View File

@ -270,7 +270,7 @@ namespace osu.Game.Tests.Visual.UserInterface
createScreen(); createScreen();
AddStep("select difficulty adjust via panel", () => getPanelForMod(typeof(OsuModDifficultyAdjust)).TriggerClick()); AddStep("select difficulty adjust via panel", () => getPanelForMod(typeof(OsuModDifficultyAdjust)).TriggerClick());
AddStep("set setting", () => modSelectOverlay.ChildrenOfType<NormalSliderBar<float>>().First().Current.Value = 8); AddStep("set setting", () => modSelectOverlay.ChildrenOfType<RoundedSliderBar<float>>().First().Current.Value = 8);
AddAssert("ensure setting is propagated", () => SelectedMods.Value.OfType<OsuModDifficultyAdjust>().Single().CircleSize.Value == 8); AddAssert("ensure setting is propagated", () => SelectedMods.Value.OfType<OsuModDifficultyAdjust>().Single().CircleSize.Value == 8);

View File

@ -21,7 +21,7 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
public partial class ExpandableSlider<T, TSlider> : CompositeDrawable, IExpandable, IHasCurrentValue<T> public partial class ExpandableSlider<T, TSlider> : CompositeDrawable, IExpandable, IHasCurrentValue<T>
where T : struct, IEquatable<T>, IComparable<T>, IConvertible where T : struct, IEquatable<T>, IComparable<T>, IConvertible
where TSlider : NormalSliderBar<T>, new() where TSlider : RoundedSliderBar<T>, new()
{ {
private readonly OsuSpriteText label; private readonly OsuSpriteText label;
private readonly TSlider slider; private readonly TSlider slider;
@ -130,7 +130,7 @@ namespace osu.Game.Graphics.UserInterface
/// <summary> /// <summary>
/// An <see cref="IExpandable"/> implementation for the UI slider bar control. /// An <see cref="IExpandable"/> implementation for the UI slider bar control.
/// </summary> /// </summary>
public partial class ExpandableSlider<T> : ExpandableSlider<T, NormalSliderBar<T>> public partial class ExpandableSlider<T> : ExpandableSlider<T, RoundedSliderBar<T>>
where T : struct, IEquatable<T>, IComparable<T>, IConvertible where T : struct, IEquatable<T>, IComparable<T>, IConvertible
{ {
} }

View File

@ -158,7 +158,7 @@ namespace osu.Game.Graphics.UserInterface
&& screenSpacePos.X >= Nub.ScreenSpaceDrawQuad.TopLeft.X; && screenSpacePos.X >= Nub.ScreenSpaceDrawQuad.TopLeft.X;
} }
protected partial class BoundSlider : NormalSliderBar<double> protected partial class BoundSlider : RoundedSliderBar<double>
{ {
public string? DefaultString; public string? DefaultString;
public LocalisableString? DefaultTooltip; public LocalisableString? DefaultTooltip;

View File

@ -14,7 +14,7 @@ using osu.Game.Overlays;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
public partial class NormalSliderBar<T> : OsuSliderBar<T> public partial class RoundedSliderBar<T> : OsuSliderBar<T>
where T : struct, IEquatable<T>, IComparable<T>, IConvertible where T : struct, IEquatable<T>, IComparable<T>, IConvertible
{ {
protected readonly RoundedNub Nub; protected readonly RoundedNub Nub;
@ -48,7 +48,7 @@ namespace osu.Game.Graphics.UserInterface
} }
} }
public NormalSliderBar() public RoundedSliderBar()
{ {
Height = RoundedNub.HEIGHT; Height = RoundedNub.HEIGHT;
RangePadding = RoundedNub.EXPANDED_SIZE / 2; RangePadding = RoundedNub.EXPANDED_SIZE / 2;

View File

@ -10,7 +10,7 @@ namespace osu.Game.Graphics.UserInterface
/// <summary> /// <summary>
/// A slider bar which displays a millisecond time value. /// A slider bar which displays a millisecond time value.
/// </summary> /// </summary>
public partial class TimeSlider : NormalSliderBar<double> public partial class TimeSlider : RoundedSliderBar<double>
{ {
public override LocalisableString TooltipText => $"{Current.Value:N0} ms"; public override LocalisableString TooltipText => $"{Current.Value:N0} ms";
} }

View File

@ -107,7 +107,7 @@ namespace osu.Game.Overlays.FirstRunSetup
public override bool? AllowTrackAdjustments => false; public override bool? AllowTrackAdjustments => false;
} }
private partial class UIScaleSlider : NormalSliderBar<float> private partial class UIScaleSlider : RoundedSliderBar<float>
{ {
public override LocalisableString TooltipText => base.TooltipText + "x"; public override LocalisableString TooltipText => base.TooltipText + "x";
} }

View File

@ -58,7 +58,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
{ {
protected override Drawable CreateControl() protected override Drawable CreateControl()
{ {
var sliderBar = (NormalSliderBar<double>)base.CreateControl(); var sliderBar = (RoundedSliderBar<double>)base.CreateControl();
sliderBar.PlaySamplesOnAdjust = false; sliderBar.PlaySamplesOnAdjust = false;
return sliderBar; return sliderBar;
} }

View File

@ -329,7 +329,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
} }
} }
private partial class UIScaleSlider : NormalSliderBar<float> private partial class UIScaleSlider : RoundedSliderBar<float>
{ {
public override LocalisableString TooltipText => base.TooltipText + "x"; public override LocalisableString TooltipText => base.TooltipText + "x";
} }

View File

@ -135,7 +135,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
} }
} }
public partial class SensitivitySlider : NormalSliderBar<double> public partial class SensitivitySlider : RoundedSliderBar<double>
{ {
public override LocalisableString TooltipText => Current.Disabled ? MouseSettingsStrings.EnableHighPrecisionForSensitivityAdjust : $"{base.TooltipText}x"; public override LocalisableString TooltipText => Current.Disabled ? MouseSettingsStrings.EnableHighPrecisionForSensitivityAdjust : $"{base.TooltipText}x";
} }

View File

@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Settings.Sections
/// <summary> /// <summary>
/// A slider intended to show a "size" multiplier number, where 1x is 1.0. /// A slider intended to show a "size" multiplier number, where 1x is 1.0.
/// </summary> /// </summary>
public partial class SizeSlider<T> : NormalSliderBar<T> public partial class SizeSlider<T> : RoundedSliderBar<T>
where T : struct, IEquatable<T>, IComparable<T>, IConvertible, IFormattable where T : struct, IEquatable<T>, IComparable<T>, IConvertible, IFormattable
{ {
public override LocalisableString TooltipText => Current.Value.ToString(@"0.##x", NumberFormatInfo.CurrentInfo); public override LocalisableString TooltipText => Current.Value.ToString(@"0.##x", NumberFormatInfo.CurrentInfo);

View File

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

View File

@ -104,7 +104,7 @@ namespace osu.Game.Rulesets.Mods
{ {
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {
new NormalSliderBar<float> new RoundedSliderBar<float>
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Current = currentNumber, Current = currentNumber,

View File

@ -70,7 +70,7 @@ namespace osu.Game.Rulesets.Mods
} }
} }
public partial class PercentSlider : NormalSliderBar<double> public partial class PercentSlider : RoundedSliderBar<double>
{ {
public PercentSlider() public PercentSlider()
{ {

View File

@ -94,7 +94,7 @@ namespace osu.Game.Rulesets.Mods
public ScoreRank AdjustRank(ScoreRank rank, double accuracy) => rank; public ScoreRank AdjustRank(ScoreRank rank, double accuracy) => rank;
} }
public partial class MuteComboSlider : NormalSliderBar<int> public partial class MuteComboSlider : RoundedSliderBar<int>
{ {
public override LocalisableString TooltipText => Current.Value == 0 ? "always muted" : base.TooltipText; public override LocalisableString TooltipText => Current.Value == 0 ? "always muted" : base.TooltipText;
} }

View File

@ -62,7 +62,7 @@ namespace osu.Game.Rulesets.Mods
} }
} }
public partial class HiddenComboSlider : NormalSliderBar<int> public partial class HiddenComboSlider : RoundedSliderBar<int>
{ {
public override LocalisableString TooltipText => Current.Value == 0 ? "always hidden" : base.TooltipText; public override LocalisableString TooltipText => Current.Value == 0 ? "always hidden" : base.TooltipText;
} }

View File

@ -15,11 +15,11 @@ namespace osu.Game.Screens.Play.PlayerSettings
public partial class PlayerSliderBar<T> : SettingsSlider<T> public partial class PlayerSliderBar<T> : SettingsSlider<T>
where T : struct, IEquatable<T>, IComparable<T>, IConvertible where T : struct, IEquatable<T>, IComparable<T>, IConvertible
{ {
public NormalSliderBar<T> Bar => (NormalSliderBar<T>)Control; public RoundedSliderBar<T> Bar => (RoundedSliderBar<T>)Control;
protected override Drawable CreateControl() => new SliderBar(); protected override Drawable CreateControl() => new SliderBar();
protected partial class SliderBar : NormalSliderBar<T> protected partial class SliderBar : RoundedSliderBar<T>
{ {
public SliderBar() public SliderBar()
{ {