1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 16:22:57 +08:00
osu-lazer/osu.Game/Overlays/Options/Online/PrivacyOptions.cs

34 lines
1.1 KiB
C#
Raw Normal View History

2016-11-09 11:38:40 +08:00
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
2016-11-09 11:38:40 +08:00
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Online
{
public class PrivacyOptions : OptionsSubsection
{
protected override string Header => "Privacy";
2016-11-09 11:38:40 +08:00
private CheckBoxOption shareCity, allowInvites;
public PrivacyOptions()
{
Children = new Drawable[]
{
2016-11-09 11:38:40 +08:00
shareCity = new CheckBoxOption { LabelText = "Share your city location with others" },
allowInvites = new CheckBoxOption { LabelText = "Allow multiplayer game invites from all users" },
};
}
2016-11-09 11:38:40 +08:00
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
shareCity.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.DisplayCityLocation);
allowInvites.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AllowPublicInvites);
}
}
}
}