2019-01-24 17:43:03 +09:00
|
|
|
|
// 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.
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2022-06-17 16:37:17 +09:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2016-11-10 17:40:42 -05:00
|
|
|
|
using osu.Framework.Allocation;
|
2017-01-25 18:39:41 +09:00
|
|
|
|
using osu.Framework.Configuration;
|
2016-11-08 22:38:40 -05:00
|
|
|
|
using osu.Framework.Graphics;
|
2021-07-15 12:50:34 +09:00
|
|
|
|
using osu.Framework.Localisation;
|
2020-02-28 19:11:18 +09:00
|
|
|
|
using osu.Framework.Platform;
|
2017-05-03 20:34:53 +09:00
|
|
|
|
using osu.Game.Configuration;
|
2021-08-11 16:48:37 +08:00
|
|
|
|
using osu.Game.Localisation;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2017-05-15 10:55:29 +09:00
|
|
|
|
namespace osu.Game.Overlays.Settings.Sections.Graphics
|
2016-11-12 19:44:16 +09:00
|
|
|
|
{
|
2017-05-15 10:55:29 +09:00
|
|
|
|
public class RendererSettings : SettingsSubsection
|
2016-11-12 19:44:16 +09:00
|
|
|
|
{
|
2021-08-11 16:48:37 +08:00
|
|
|
|
protected override LocalisableString Header => GraphicsSettingsStrings.RendererHeader;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2016-11-12 19:44:16 +09:00
|
|
|
|
[BackgroundDependencyLoader]
|
2017-05-03 20:34:53 +09:00
|
|
|
|
private void load(FrameworkConfigManager config, OsuConfigManager osuConfig)
|
2016-11-08 22:38:40 -05:00
|
|
|
|
{
|
2016-11-10 17:40:42 -05:00
|
|
|
|
// NOTE: Compatability mode omitted
|
|
|
|
|
Children = new Drawable[]
|
2016-11-08 22:38:40 -05:00
|
|
|
|
{
|
2016-12-01 17:28:20 -05:00
|
|
|
|
// TODO: this needs to be a custom dropdown at some point
|
2022-06-13 15:40:21 +09:00
|
|
|
|
new SettingsEnumDropdown<FrameSync>
|
2016-12-01 17:28:20 -05:00
|
|
|
|
{
|
2021-08-11 16:48:37 +08:00
|
|
|
|
LabelText = GraphicsSettingsStrings.FrameLimiter,
|
2020-10-06 17:18:41 +09:00
|
|
|
|
Current = config.GetBindable<FrameSync>(FrameworkSetting.FrameSync)
|
2016-12-01 17:28:20 -05:00
|
|
|
|
},
|
2020-02-28 19:11:18 +09:00
|
|
|
|
new SettingsEnumDropdown<ExecutionMode>
|
|
|
|
|
{
|
2021-08-11 16:48:37 +08:00
|
|
|
|
LabelText = GraphicsSettingsStrings.ThreadingMode,
|
2020-10-06 17:18:41 +09:00
|
|
|
|
Current = config.GetBindable<ExecutionMode>(FrameworkSetting.ExecutionMode)
|
2020-02-28 19:11:18 +09:00
|
|
|
|
},
|
2017-05-15 10:55:29 +09:00
|
|
|
|
new SettingsCheckbox
|
2017-05-03 20:34:53 +09:00
|
|
|
|
{
|
2021-08-11 16:48:37 +08:00
|
|
|
|
LabelText = GraphicsSettingsStrings.ShowFPS,
|
2020-10-06 17:18:41 +09:00
|
|
|
|
Current = osuConfig.GetBindable<bool>(OsuSetting.ShowFpsDisplay)
|
2017-05-03 20:34:53 +09:00
|
|
|
|
},
|
2016-11-10 17:40:42 -05:00
|
|
|
|
};
|
2016-11-12 19:44:16 +09:00
|
|
|
|
}
|
|
|
|
|
}
|
2017-05-04 23:07:24 +09:00
|
|
|
|
}
|