mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Merge remote-tracking branch 'upstream/master' into menu-background-modes
This commit is contained in:
@ -60,7 +60,10 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
dropdown = new AudioDeviceSettingsDropdown()
|
||||
dropdown = new AudioDeviceSettingsDropdown
|
||||
{
|
||||
Keywords = new[] { "speaker", "headphone", "output" }
|
||||
}
|
||||
};
|
||||
|
||||
updateItems();
|
||||
|
@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Overlays.Settings.Sections.Audio;
|
||||
@ -10,6 +12,9 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
public class AudioSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Audio";
|
||||
|
||||
public override IEnumerable<string> FilterTerms => base.FilterTerms.Concat(new[] { "sound" });
|
||||
|
||||
public override IconUsage Icon => FontAwesome.Solid.VolumeUp;
|
||||
|
||||
public AudioSection()
|
||||
@ -19,7 +24,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
new AudioDevicesSettings(),
|
||||
new VolumeSettings(),
|
||||
new OffsetSettings(),
|
||||
new MainMenuSettings(),
|
||||
new MainMenuSettings()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
LabelText = "Show health display even when you can't fail",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.ShowHealthDisplayWhenCantFail),
|
||||
Keywords = new[] { "hp", "bar" }
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
|
@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
@ -10,6 +12,8 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
protected override string Header => "Mods";
|
||||
|
||||
public override IEnumerable<string> FilterTerms => base.FilterTerms.Concat(new[] { "mod" });
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
@ -18,7 +22,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Increase visibility of first object when visual impairment mods are enabled",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.IncreaseFirstObjectVisibility)
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.IncreaseFirstObjectVisibility),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -31,13 +31,15 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
LabelText = "Display beatmaps from",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMinimum),
|
||||
KeyboardStep = 0.1f
|
||||
KeyboardStep = 0.1f,
|
||||
Keywords = new[] { "star", "difficulty" }
|
||||
},
|
||||
new SettingsSlider<double, StarSlider>
|
||||
{
|
||||
LabelText = "up to",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum),
|
||||
KeyboardStep = 0.1f
|
||||
KeyboardStep = 0.1f,
|
||||
Keywords = new[] { "star", "difficulty" }
|
||||
},
|
||||
new SettingsEnumDropdown<RandomSelectAlgorithm>
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
api?.Register(this);
|
||||
}
|
||||
|
||||
public void APIStateChanged(IAPIProvider api, APIState state)
|
||||
public void APIStateChanged(IAPIProvider api, APIState state) => Schedule(() =>
|
||||
{
|
||||
form = null;
|
||||
|
||||
@ -184,7 +184,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
}
|
||||
|
||||
if (form != null) GetContainingInputManager()?.ChangeFocus(form);
|
||||
}
|
||||
});
|
||||
|
||||
public override bool AcceptsFocus => true;
|
||||
|
||||
@ -200,6 +200,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
private TextBox username;
|
||||
private TextBox password;
|
||||
private ShakeContainer shakeSignIn;
|
||||
private IAPIProvider api;
|
||||
|
||||
public Action RequestHide;
|
||||
@ -208,6 +209,8 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text))
|
||||
api.Login(username.Text, password.Text);
|
||||
else
|
||||
shakeSignIn.Shake();
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
@ -244,10 +247,23 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
LabelText = "Stay signed in",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.SavePassword),
|
||||
},
|
||||
new SettingsButton
|
||||
new Container
|
||||
{
|
||||
Text = "Sign in",
|
||||
Action = performLogin
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
shakeSignIn = new ShakeContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Child = new SettingsButton
|
||||
{
|
||||
Text = "Sign in",
|
||||
Action = performLogin
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
new SettingsButton
|
||||
{
|
||||
|
@ -75,12 +75,14 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
LabelText = "UI Scaling",
|
||||
TransferValueOnCommit = true,
|
||||
Bindable = osuConfig.GetBindable<float>(OsuSetting.UIScale),
|
||||
KeyboardStep = 0.01f
|
||||
KeyboardStep = 0.01f,
|
||||
Keywords = new[] { "scale", "letterbox" },
|
||||
},
|
||||
new SettingsEnumDropdown<ScalingMode>
|
||||
{
|
||||
LabelText = "Screen Scaling",
|
||||
Bindable = osuConfig.GetBindable<ScalingMode>(OsuSetting.Scaling),
|
||||
Keywords = new[] { "scale", "letterbox" },
|
||||
},
|
||||
scalingSettings = new FillFlowContainer<SettingsSlider<float>>
|
||||
{
|
||||
|
@ -27,16 +27,16 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
LabelText = "Parallax",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.MenuParallax)
|
||||
},
|
||||
new SettingsSlider<int, TimeSlider>
|
||||
new SettingsSlider<float, TimeSlider>
|
||||
{
|
||||
LabelText = "Hold-to-confirm activation time",
|
||||
Bindable = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay),
|
||||
Bindable = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay),
|
||||
KeyboardStep = 50
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
private class TimeSlider : OsuSliderBar<int>
|
||||
private class TimeSlider : OsuSliderBar<float>
|
||||
{
|
||||
public override string TooltipText => Current.Value.ToString("N0") + "ms";
|
||||
}
|
||||
|
Reference in New Issue
Block a user