mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Merge pull request #11411 from LavaDesu/feature/discord-presence-toggle
Add ability to toggle discord rich presence
This commit is contained in:
17
osu.Game/Configuration/DiscordRichPresenceMode.cs
Normal file
17
osu.Game/Configuration/DiscordRichPresenceMode.cs
Normal file
@ -0,0 +1,17 @@
|
||||
// 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.
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Configuration
|
||||
{
|
||||
public enum DiscordRichPresenceMode
|
||||
{
|
||||
Off,
|
||||
|
||||
[Description("Hide identifiable information")]
|
||||
Limited,
|
||||
|
||||
Full
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// 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.
|
||||
|
||||
using System;
|
||||
@ -138,6 +138,8 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.MenuBackgroundSource, BackgroundSource.Skin);
|
||||
Set(OsuSetting.SeasonalBackgroundMode, SeasonalBackgroundMode.Sometimes);
|
||||
|
||||
Set(OsuSetting.DiscordRichPresence, DiscordRichPresenceMode.Full);
|
||||
|
||||
Set(OsuSetting.EditorWaveformOpacity, 1f);
|
||||
}
|
||||
|
||||
@ -266,6 +268,7 @@ namespace osu.Game.Configuration
|
||||
GameplayDisableWinKey,
|
||||
SeasonalBackgroundMode,
|
||||
EditorWaveformOpacity,
|
||||
DiscordRichPresence,
|
||||
AutomaticallyDownloadWhenSpectating,
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
// 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.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Online
|
||||
{
|
||||
public class IntegrationSettings : SettingsSubsection
|
||||
{
|
||||
protected override string Header => "Integrations";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SettingsEnumDropdown<DiscordRichPresenceMode>
|
||||
{
|
||||
LabelText = "Discord Rich Presence",
|
||||
Current = config.GetBindable<DiscordRichPresenceMode>(OsuSetting.DiscordRichPresence)
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -20,7 +20,8 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new WebSettings()
|
||||
new WebSettings(),
|
||||
new IntegrationSettings()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user