1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 21:13:22 +08:00

Apply suggestions

This commit is contained in:
Andrei Zavatski 2019-11-21 00:26:39 +03:00
parent 6b3010535f
commit f066d8434c
7 changed files with 10 additions and 15 deletions

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // 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. // 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.Framework.Allocation;
using osu.Framework.Audio; using osu.Framework.Audio;
using osu.Framework.Graphics; using osu.Framework.Graphics;
@ -14,8 +12,6 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
{ {
protected override string Header => "Volume"; protected override string Header => "Volume";
public override IEnumerable<string> FilterTerms => base.FilterTerms.Concat(new[] { "Sound" });
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(AudioManager audio, OsuConfigManager config) private void load(AudioManager audio, OsuConfigManager config)
{ {

View File

@ -1,6 +1,8 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // 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. // 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;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Overlays.Settings.Sections.Audio; using osu.Game.Overlays.Settings.Sections.Audio;
@ -10,6 +12,9 @@ namespace osu.Game.Overlays.Settings.Sections
public class AudioSection : SettingsSection public class AudioSection : SettingsSection
{ {
public override string Header => "Audio"; public override string Header => "Audio";
public override IEnumerable<string> FilterTerms => base.FilterTerms.Concat(new[] { "Sound" });
public override IconUsage Icon => FontAwesome.Solid.VolumeUp; public override IconUsage Icon => FontAwesome.Solid.VolumeUp;
public AudioSection() public AudioSection()

View File

@ -38,7 +38,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
{ {
LabelText = "Show health display even when you can't fail", LabelText = "Show health display even when you can't fail",
Bindable = config.GetBindable<bool>(OsuSetting.ShowHealthDisplayWhenCantFail), Bindable = config.GetBindable<bool>(OsuSetting.ShowHealthDisplayWhenCantFail),
Keywords = new[] { "Bar" } Keywords = new[] { "Bar", "Hp" }
}, },
new SettingsCheckbox new SettingsCheckbox
{ {

View File

@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
{ {
LabelText = "Increase visibility of first object when visual impairment mods are enabled", LabelText = "Increase visibility of first object when visual impairment mods are enabled",
Bindable = config.GetBindable<bool>(OsuSetting.IncreaseFirstObjectVisibility), Bindable = config.GetBindable<bool>(OsuSetting.IncreaseFirstObjectVisibility),
Keywords = new[] { "Hidden", "Traceable" } Keywords = new[] { "Mod" }
}, },
}; };
} }

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // 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. // 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.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
@ -14,8 +12,6 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
{ {
protected override string Header => "Renderer"; protected override string Header => "Renderer";
public override IEnumerable<string> FilterTerms => base.FilterTerms.Concat(new[] { "FPS" });
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(FrameworkConfigManager config, OsuConfigManager osuConfig) private void load(FrameworkConfigManager config, OsuConfigManager osuConfig)
{ {

View File

@ -27,14 +27,12 @@ namespace osu.Game.Overlays.Settings.Sections.Input
new SettingsCheckbox new SettingsCheckbox
{ {
LabelText = "Raw input", LabelText = "Raw input",
Bindable = rawInputToggle, Bindable = rawInputToggle
Keywords = new[] { "Speed" }
}, },
sensitivity = new SensitivitySetting sensitivity = new SensitivitySetting
{ {
LabelText = "Cursor sensitivity", LabelText = "Cursor sensitivity",
Bindable = config.GetBindable<double>(FrameworkSetting.CursorSensitivity), Bindable = config.GetBindable<double>(FrameworkSetting.CursorSensitivity)
Keywords = new[] { "Speed" }
}, },
new SettingsCheckbox new SettingsCheckbox
{ {

View File

@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Settings
public abstract string Header { get; } public abstract string Header { get; }
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>(); public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
public IEnumerable<string> FilterTerms => new[] { Header }; public virtual IEnumerable<string> FilterTerms => new[] { Header };
private const int header_size = 26; private const int header_size = 26;
private const int header_margin = 25; private const int header_margin = 25;