1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 15:12:57 +08:00

Add existing setting notes from stable

This commit is contained in:
Joseph Madamba 2021-05-04 00:59:48 -07:00
parent acc9258eb2
commit 796bd8e47e
2 changed files with 23 additions and 2 deletions

View File

@ -141,7 +141,14 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();
windowModeDropdown.Current.BindValueChanged(mode =>
{
updateResolutionDropdown();
const string not_fullscreen_note = "Running without fullscreen mode will increase your input latency!";
windowModeDropdown.NoteText = mode.NewValue != WindowMode.Fullscreen ? not_fullscreen_note : string.Empty;
}, true);
windowModes.BindCollectionChanged((sender, args) =>
{

View File

@ -13,6 +13,8 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
{
protected override string Header => "Renderer";
private SettingsEnumDropdown<FrameSync> frameLimiterDropdown;
[BackgroundDependencyLoader]
private void load(FrameworkConfigManager config, OsuConfigManager osuConfig)
{
@ -20,7 +22,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
Children = new Drawable[]
{
// TODO: this needs to be a custom dropdown at some point
new SettingsEnumDropdown<FrameSync>
frameLimiterDropdown = new SettingsEnumDropdown<FrameSync>
{
LabelText = "Frame limiter",
Current = config.GetBindable<FrameSync>(FrameworkSetting.FrameSync)
@ -37,5 +39,17 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
},
};
}
protected override void LoadComplete()
{
base.LoadComplete();
frameLimiterDropdown.Current.BindValueChanged(limit =>
{
const string unlimited_frames_note = "Using unlimited frame limiter can lead to stutters. \"2x refresh rate\" is recommended.";
frameLimiterDropdown.NoteText = limit.NewValue == FrameSync.Unlimited ? unlimited_frames_note : string.Empty;
}, true);
}
}
}