2016-11-09 11:38:40 +08:00
|
|
|
|
using osu.Framework;
|
|
|
|
|
using osu.Framework.Graphics;
|
2016-11-08 11:15:48 +08:00
|
|
|
|
using osu.Framework.Graphics.UserInterface;
|
2016-11-09 11:38:40 +08:00
|
|
|
|
using osu.Game.Configuration;
|
2016-11-08 11:15:48 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Options.Online
|
|
|
|
|
{
|
|
|
|
|
public class NotificationsOptions : OptionsSubsection
|
|
|
|
|
{
|
|
|
|
|
protected override string Header => "Notifications";
|
2016-11-09 11:38:40 +08:00
|
|
|
|
|
|
|
|
|
private CheckBoxOption chatTicker, notifyMention, notifyChat, audibleNotification,
|
|
|
|
|
notificationsDuringGameplay, notifyFriendStatus;
|
2016-11-08 11:15:48 +08:00
|
|
|
|
|
|
|
|
|
public NotificationsOptions()
|
|
|
|
|
{
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2016-11-09 11:38:40 +08:00
|
|
|
|
chatTicker = new CheckBoxOption { LabelText = "Enable chat ticker" },
|
|
|
|
|
notifyMention = new CheckBoxOption { LabelText = "Show a notification popup when someone says your name" },
|
|
|
|
|
notifyChat = new CheckBoxOption { LabelText = "Show chat message notifications" },
|
|
|
|
|
audibleNotification = new CheckBoxOption { LabelText = "Play a sound when someone says your name" },
|
|
|
|
|
notificationsDuringGameplay = new CheckBoxOption { LabelText = "Show notification popups instantly during gameplay" },
|
|
|
|
|
notifyFriendStatus = new CheckBoxOption { LabelText = "Show notification popups when friends change status" },
|
2016-11-08 11:15:48 +08:00
|
|
|
|
};
|
|
|
|
|
}
|
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)
|
|
|
|
|
{
|
|
|
|
|
chatTicker.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Ticker);
|
|
|
|
|
notifyMention.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ChatHighlightName);
|
|
|
|
|
notifyChat.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ChatMessageNotification);
|
|
|
|
|
audibleNotification.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ChatAudibleHighlight);
|
|
|
|
|
notificationsDuringGameplay.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.PopupDuringGameplay);
|
|
|
|
|
notifyFriendStatus.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.NotifyFriends);
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-11-08 11:15:48 +08:00
|
|
|
|
}
|
|
|
|
|
}
|