mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Merge pull request #18922 from Joehuu/fix-da-settings-slider-padding
Fix difficulty adjust settings having more padding on sliders
This commit is contained in:
@ -13,7 +13,7 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Overlays.Settings;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Osu.Mods;
|
using osu.Game.Rulesets.Osu.Mods;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
@ -246,7 +246,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<SettingsSlider<float>>().First().Current.Value = value);
|
.ChildrenOfType<OsuSliderBar<float>>().First().Current.Value = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkBindableAtValue(string name, float? expectedValue)
|
private void checkBindableAtValue(string name, float? expectedValue)
|
||||||
@ -260,7 +260,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<SettingsSlider<float>>().First().Current.Value == expectedValue);
|
.ChildrenOfType<OsuSliderBar<float>>().First().Current.Value == expectedValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setBeatmapWithDifficultyParameters(float value)
|
private void setBeatmapWithDifficultyParameters(float value)
|
||||||
|
@ -230,7 +230,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
createScreen();
|
createScreen();
|
||||||
AddStep("select diff adjust", () => SelectedMods.Value = new Mod[] { new OsuModDifficultyAdjust() });
|
AddStep("select diff adjust", () => SelectedMods.Value = new Mod[] { new OsuModDifficultyAdjust() });
|
||||||
|
|
||||||
AddStep("set setting", () => modSelectOverlay.ChildrenOfType<SettingsSlider<float>>().First().Current.Value = 8);
|
AddStep("set setting", () => modSelectOverlay.ChildrenOfType<OsuSliderBar<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);
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Overlays.Settings;
|
using osu.Game.Overlays.Settings;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mods
|
namespace osu.Game.Rulesets.Mods
|
||||||
@ -103,9 +104,9 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
{
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new SettingsSlider<float>
|
new OsuSliderBar<float>
|
||||||
{
|
{
|
||||||
ShowsDefaultIndicator = false,
|
RelativeSizeAxes = Axes.X,
|
||||||
Current = currentNumber,
|
Current = currentNumber,
|
||||||
KeyboardStep = 0.1f,
|
KeyboardStep = 0.1f,
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user