mirror of
https://github.com/SK-la/Ez2Lazer.git
synced 2026-03-13 11:20:28 +00:00
Improve adjusting mods settings values with keyboard (#36090)
- closes https://github.com/ppy/osu/issues/36016 Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
@@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
[SettingSource(
|
||||
"Max size at combo",
|
||||
"The combo count at which the cursor reaches its maximum size",
|
||||
SettingControlType = typeof(SettingsSlider<int, RoundedSliderBar<int>>)
|
||||
SettingControlType = typeof(SettingsSlider<int, MaxSizeComboSlider>)
|
||||
)]
|
||||
public BindableInt MaxSizeComboCount { get; } = new BindableInt(50)
|
||||
{
|
||||
@@ -85,4 +85,12 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
cursor.ModScaleAdjust.Value = (float)Interpolation.Lerp(cursor.ModScaleAdjust.Value, currentSize, Math.Clamp(cursor.Time.Elapsed / TRANSITION_DURATION, 0, 1));
|
||||
}
|
||||
}
|
||||
|
||||
public partial class MaxSizeComboSlider : RoundedSliderBar<int>
|
||||
{
|
||||
public MaxSizeComboSlider()
|
||||
{
|
||||
KeyboardStep = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace osu.Game.Configuration
|
||||
LabelText = attr.Label,
|
||||
TooltipText = attr.Description,
|
||||
Current = bNumber,
|
||||
KeyboardStep = 0.1f,
|
||||
KeyboardStep = bNumber.Precision,
|
||||
};
|
||||
|
||||
break;
|
||||
@@ -151,7 +151,7 @@ namespace osu.Game.Configuration
|
||||
LabelText = attr.Label,
|
||||
TooltipText = attr.Description,
|
||||
Current = bNumber,
|
||||
KeyboardStep = 0.1f,
|
||||
KeyboardStep = (float)bNumber.Precision,
|
||||
};
|
||||
|
||||
break;
|
||||
@@ -161,7 +161,8 @@ namespace osu.Game.Configuration
|
||||
{
|
||||
LabelText = attr.Label,
|
||||
TooltipText = attr.Description,
|
||||
Current = bNumber
|
||||
Current = bNumber,
|
||||
KeyboardStep = bNumber.Precision,
|
||||
};
|
||||
|
||||
break;
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
}
|
||||
}
|
||||
|
||||
[SettingSource("Minimum accuracy", "Trigger a failure if your accuracy goes below this value.", SettingControlType = typeof(SettingsPercentageSlider<double>))]
|
||||
[SettingSource("Minimum accuracy", "Trigger a failure if your accuracy goes below this value.", SettingControlType = typeof(MinimumAccuracySlider))]
|
||||
public BindableNumber<double> MinimumAccuracy { get; } = new BindableDouble
|
||||
{
|
||||
MinValue = 0.60,
|
||||
@@ -103,4 +103,12 @@ namespace osu.Game.Rulesets.Mods
|
||||
Standard,
|
||||
}
|
||||
}
|
||||
|
||||
public partial class MinimumAccuracySlider : SettingsPercentageSlider<double>
|
||||
{
|
||||
public MinimumAccuracySlider()
|
||||
{
|
||||
KeyboardStep = 0.01f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +108,11 @@ namespace osu.Game.Rulesets.Mods
|
||||
|
||||
public partial class MuteComboSlider : RoundedSliderBar<int>
|
||||
{
|
||||
public MuteComboSlider()
|
||||
{
|
||||
KeyboardStep = 1;
|
||||
}
|
||||
|
||||
public override LocalisableString TooltipText => FormatMuteComboValue(Current.Value);
|
||||
|
||||
public static LocalisableString FormatMuteComboValue(int value)
|
||||
|
||||
@@ -74,6 +74,11 @@ namespace osu.Game.Rulesets.Mods
|
||||
|
||||
public partial class HiddenComboSlider : RoundedSliderBar<int>
|
||||
{
|
||||
public HiddenComboSlider()
|
||||
{
|
||||
KeyboardStep = 1;
|
||||
}
|
||||
|
||||
public override LocalisableString TooltipText => FormatHiddenComboValue(Current.Value);
|
||||
|
||||
public static LocalisableString FormatHiddenComboValue(int value)
|
||||
|
||||
Reference in New Issue
Block a user