mirror of
https://github.com/ppy/osu.git
synced 2025-03-05 14:22:55 +08:00
Merge branch 'master' into fix-multiplayer-parallax-overflow
This commit is contained in:
commit
e88d36ed38
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Overlays.Settings;
|
using osu.Game.Overlays.Settings;
|
||||||
using osu.Game.Rulesets.Mania.Configuration;
|
using osu.Game.Rulesets.Mania.Configuration;
|
||||||
using osu.Game.Rulesets.Mania.UI;
|
using osu.Game.Rulesets.Mania.UI;
|
||||||
@ -21,14 +22,26 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
|
var config = (ManiaConfigManager)Config;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SettingsEnumDropdown<ManiaScrollingDirection>
|
new SettingsEnumDropdown<ManiaScrollingDirection>
|
||||||
{
|
{
|
||||||
LabelText = "Scrolling direction",
|
LabelText = "Scrolling direction",
|
||||||
Bindable = ((ManiaConfigManager)Config).GetBindable<ManiaScrollingDirection>(ManiaSetting.ScrollDirection)
|
Bindable = config.GetBindable<ManiaScrollingDirection>(ManiaSetting.ScrollDirection)
|
||||||
}
|
},
|
||||||
|
new SettingsSlider<double, TimeSlider>
|
||||||
|
{
|
||||||
|
LabelText = "Scroll speed",
|
||||||
|
Bindable = config.GetBindable<double>(ManiaSetting.ScrollTime)
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class TimeSlider : OsuSliderBar<double>
|
||||||
|
{
|
||||||
|
public override string TooltipText => Current.Value.ToString("N0") + "ms";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ namespace osu.Game.Overlays
|
|||||||
if (configManager == null) throw new ArgumentNullException(nameof(configManager));
|
if (configManager == null) throw new ArgumentNullException(nameof(configManager));
|
||||||
|
|
||||||
if (!trackedConfigManagers.TryGetValue((source, configManager), out var existing))
|
if (!trackedConfigManagers.TryGetValue((source, configManager), out var existing))
|
||||||
throw new InvalidOperationException($"{nameof(configManager)} is not registered.");
|
return;
|
||||||
|
|
||||||
existing.Unload();
|
existing.Unload();
|
||||||
existing.SettingChanged -= display;
|
existing.SettingChanged -= display;
|
||||||
|
Loading…
Reference in New Issue
Block a user