1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 09:23:06 +08:00

Add display of current renderer

This commit is contained in:
Dean Herbert 2023-03-26 20:09:35 +09:00
parent 91da546ba2
commit e346b02ebf
2 changed files with 12 additions and 1 deletions

View File

@ -24,6 +24,11 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString Renderer => new TranslatableString(getKey(@"renderer"), @"Renderer");
/// <summary>
/// "Current renderer is &quot;{0}&quot;"
/// </summary>
public static LocalisableString CurrentRenderer(string arg0) => new TranslatableString(getKey(@"current_renderer"), @"Current renderer is ""{0}""", arg0);
/// <summary>
/// "Frame limiter"
/// </summary>

View File

@ -4,6 +4,7 @@
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Framework.Platform;
@ -25,9 +26,11 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
var renderer = config.GetBindable<RendererType>(FrameworkSetting.Renderer);
automaticRendererInUse = renderer.Value == RendererType.Automatic;
SettingsEnumDropdown<RendererType> rendererDropdown;
Children = new Drawable[]
{
new SettingsEnumDropdown<RendererType>
rendererDropdown = new SettingsEnumDropdown<RendererType>
{
LabelText = GraphicsSettingsStrings.Renderer,
Current = renderer,
@ -67,6 +70,9 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
renderer.Value = r.OldValue;
}));
});
if (renderer.Value == RendererType.Automatic)
rendererDropdown.SetNoticeText(GraphicsSettingsStrings.CurrentRenderer(host.ResolvedRenderer.GetDescription()));
}
}
}