mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 12:53:11 +08:00
Add display of current renderer
This commit is contained in:
parent
91da546ba2
commit
e346b02ebf
@ -24,6 +24,11 @@ namespace osu.Game.Localisation
|
||||
/// </summary>
|
||||
public static LocalisableString Renderer => new TranslatableString(getKey(@"renderer"), @"Renderer");
|
||||
|
||||
/// <summary>
|
||||
/// "Current renderer is "{0}""
|
||||
/// </summary>
|
||||
public static LocalisableString CurrentRenderer(string arg0) => new TranslatableString(getKey(@"current_renderer"), @"Current renderer is ""{0}""", arg0);
|
||||
|
||||
/// <summary>
|
||||
/// "Frame limiter"
|
||||
/// </summary>
|
||||
|
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user