Initial commit

This commit is contained in:
Craftplacer
2020-05-07 08:07:22 +02:00
parent c8134162b5
commit 836efe3f7c
4 changed files with 24 additions and 3 deletions

View File

@ -5,15 +5,19 @@ using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Platform;
using osu.Game.Configuration;
using osu.Game.Updater;
namespace osu.Game.Overlays.Settings.Sections.General
{
public class UpdateSettings : SettingsSubsection
{
[Resolved(CanBeNull = true)]
private UpdateManager updateManager { get; set; }
protected override string Header => "Updates";
[BackgroundDependencyLoader]
private void load(Storage storage, OsuConfigManager config)
private void load(Storage storage, OsuConfigManager config, OsuGameBase game)
{
Add(new SettingsEnumDropdown<ReleaseStream>
{
@ -21,6 +25,13 @@ namespace osu.Game.Overlays.Settings.Sections.General
Bindable = config.GetBindable<ReleaseStream>(OsuSetting.ReleaseStream),
});
Add(new SettingsButton
{
Text = "Check for updates",
Action = () => updateManager?.CheckForUpdate(),
Enabled = { Value = game.IsDeployedBuild }
});
if (RuntimeInfo.IsDesktop)
{
Add(new SettingsButton