mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 22:27:46 +08:00
Implement settings keywords
This commit is contained in:
parent
a81c26577d
commit
e820ddd3e8
@ -60,7 +60,10 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
dropdown = new AudioDeviceSettingsDropdown()
|
||||
dropdown = new AudioDeviceSettingsDropdown
|
||||
{
|
||||
Keywords = new[] { "Speaker" }
|
||||
}
|
||||
};
|
||||
|
||||
updateItems();
|
||||
|
@ -22,6 +22,8 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
new SettingsSlider<double> { LabelText = "Effect", Bindable = audio.VolumeSample, KeyboardStep = 0.01f },
|
||||
new SettingsSlider<double> { LabelText = "Music", Bindable = audio.VolumeTrack, KeyboardStep = 0.01f },
|
||||
};
|
||||
|
||||
Keywords = new[] { "Sound" };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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[] { "bar" }
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
|
@ -18,7 +18,8 @@ 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),
|
||||
Keywords = new[] { "Hidden", "Traceable" }
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -26,18 +26,21 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
LabelText = "Show converted beatmaps",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.ShowConvertedBeatmaps),
|
||||
Keywords = new[] { "Converts" }
|
||||
},
|
||||
new SettingsSlider<double, StarSlider>
|
||||
{
|
||||
LabelText = "Display beatmaps from",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMinimum),
|
||||
KeyboardStep = 0.1f
|
||||
KeyboardStep = 0.1f,
|
||||
Keywords = new[] { "Stars" }
|
||||
},
|
||||
new SettingsSlider<double, StarSlider>
|
||||
{
|
||||
LabelText = "up to",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum),
|
||||
KeyboardStep = 0.1f
|
||||
KeyboardStep = 0.1f,
|
||||
Keywords = new[] { "Stars" }
|
||||
},
|
||||
new SettingsEnumDropdown<RandomSelectAlgorithm>
|
||||
{
|
||||
|
@ -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" },
|
||||
},
|
||||
new SettingsEnumDropdown<ScalingMode>
|
||||
{
|
||||
LabelText = "Screen Scaling",
|
||||
Bindable = osuConfig.GetBindable<ScalingMode>(OsuSetting.Scaling),
|
||||
Keywords = new[] { "Scale" },
|
||||
},
|
||||
scalingSettings = new FillFlowContainer<SettingsSlider<float>>
|
||||
{
|
||||
|
@ -30,6 +30,8 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
Bindable = osuConfig.GetBindable<bool>(OsuSetting.ShowFpsDisplay)
|
||||
},
|
||||
};
|
||||
|
||||
Keywords = new[] { "fps" };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,12 +27,14 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Raw input",
|
||||
Bindable = rawInputToggle
|
||||
Bindable = rawInputToggle,
|
||||
Keywords = new[] { "Speed" }
|
||||
},
|
||||
sensitivity = new SensitivitySetting
|
||||
{
|
||||
LabelText = "Cursor sensitivity",
|
||||
Bindable = config.GetBindable<double>(FrameworkSetting.CursorSensitivity)
|
||||
Bindable = config.GetBindable<double>(FrameworkSetting.CursorSensitivity),
|
||||
Keywords = new[] { "Speed" }
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
|
@ -76,7 +76,12 @@ namespace osu.Game.Overlays.Settings
|
||||
}
|
||||
}
|
||||
|
||||
public virtual IEnumerable<string> FilterTerms => new[] { LabelText };
|
||||
public virtual IEnumerable<string> FilterTerms => Keywords == null ? new[] { LabelText } : new List<string>(Keywords)
|
||||
{
|
||||
LabelText
|
||||
}.ToArray();
|
||||
|
||||
public IEnumerable<string> Keywords { get; set; }
|
||||
|
||||
public bool MatchingFilter
|
||||
{
|
||||
|
@ -21,7 +21,12 @@ namespace osu.Game.Overlays.Settings
|
||||
protected abstract string Header { get; }
|
||||
|
||||
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
||||
public IEnumerable<string> FilterTerms => new[] { Header };
|
||||
public virtual IEnumerable<string> FilterTerms => Keywords == null ? new[] { Header } : new List<string>(Keywords)
|
||||
{
|
||||
Header
|
||||
}.ToArray();
|
||||
|
||||
public IEnumerable<string> Keywords { get; set; }
|
||||
|
||||
public bool MatchingFilter
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user