1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 00:52:57 +08:00

Wire up all of the boolean options

This commit is contained in:
Drew DeVault 2016-11-08 22:38:40 -05:00
parent 485f60b418
commit 3ad633f363
31 changed files with 374 additions and 120 deletions

View File

@ -5,7 +5,7 @@ namespace osu.Game.Overlays.Options.Audio
public class AudioDevicesOptions : OptionsSubsection
{
protected override string Header => "Devices";
public AudioDevicesOptions()
{
Children = new[]

View File

@ -7,7 +7,7 @@ namespace osu.Game.Overlays.Options.Audio
{
protected override string Header => "Audio";
public override FontAwesome Icon => FontAwesome.fa_headphones;
public AudioSection()
{
Children = new Drawable[]

View File

@ -7,7 +7,7 @@ namespace osu.Game.Overlays.Options.Audio
public class OffsetAdjustmentOptions : OptionsSubsection
{
protected override string Header => "Offset Adjustment";
public OffsetAdjustmentOptions()
{
Children = new Drawable[]

View File

@ -1,12 +1,16 @@
using osu.Framework.Graphics;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Audio
{
public class VolumeOptions : OptionsSubsection
{
protected override string Header => "Volume";
protected override string Header => "Volume";
private CheckBoxOption ignoreHitsounds;
public VolumeOptions()
{
@ -15,8 +19,18 @@ namespace osu.Game.Overlays.Options.Audio
new SpriteText { Text = "Master: TODO slider" },
new SpriteText { Text = "Music: TODO slider" },
new SpriteText { Text = "Effect: TODO slider" },
new BasicCheckBox { LabelText = "Ignore beatmap hitsounds" }
ignoreHitsounds = new CheckBoxOption { LabelText = "Ignore beatmap hitsounds" }
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
ignoreHitsounds.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSamples);
}
}
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Overlays.Options
public class CheckBoxOption : BasicCheckBox
{
private Bindable<bool> bindable;
public Bindable<bool> Bindable
{
set
@ -28,21 +28,21 @@ namespace osu.Game.Overlays.Options
{
State = bindable.Value ? CheckBoxState.Checked : CheckBoxState.Unchecked;
}
protected override void Dispose(bool isDisposing)
{
if (bindable != null)
bindable.ValueChanged -= bindableValueChanged;
base.Dispose(isDisposing);
}
protected override void OnChecked()
{
if (bindable != null)
bindable.Value = true;
base.OnChecked();
}
protected override void OnUnchecked()
{
if (bindable != null)

View File

@ -1,6 +1,8 @@
using OpenTK;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Options
@ -8,20 +10,37 @@ namespace osu.Game.Overlays.Options
public class EditorSection : OptionsSection
{
protected override string Header => "Editor";
public override FontAwesome Icon => FontAwesome.fa_pencil;
public override FontAwesome Icon => FontAwesome.fa_pencil;
private CheckBoxOption backgroundVideo, defaultSkin, snakingSliders, hitAnimations, followPoints, stacking;
public EditorSection()
{
content.Spacing = new Vector2(0, 5);
Children = new Drawable[]
{
new BasicCheckBox { LabelText = "Background video" },
new BasicCheckBox { LabelText = "Always use default skin" },
new BasicCheckBox { LabelText = "Snaking sliders" },
new BasicCheckBox { LabelText = "Hit animations" },
new BasicCheckBox { LabelText = "Follow points" },
new BasicCheckBox { LabelText = "Stacking" },
backgroundVideo = new CheckBoxOption { LabelText = "Background video" },
defaultSkin = new CheckBoxOption { LabelText = "Always use default skin" },
snakingSliders = new CheckBoxOption { LabelText = "Snaking sliders" },
hitAnimations = new CheckBoxOption { LabelText = "Hit animations" },
followPoints = new CheckBoxOption { LabelText = "Follow points" },
stacking = new CheckBoxOption { LabelText = "Stacking" },
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
backgroundVideo.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.VideoEditor);
defaultSkin.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorDefaultSkin);
snakingSliders.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorSnakingSliders);
hitAnimations.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorHitAnimations);
followPoints.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorFollowPoints);
stacking.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorStacking);
}
}
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Overlays.Options.Gameplay
{
protected override string Header => "Gameplay";
public override FontAwesome Icon => FontAwesome.fa_circle_o;
public GameplaySection()
{
Children = new Drawable[]

View File

@ -1,13 +1,17 @@
using osu.Framework.Graphics;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Gameplay
{
public class GeneralGameplayOptions : OptionsSubsection
{
protected override string Header => "General";
protected override string Header => "General";
private CheckBoxOption keyOverlay, hiddenApproachCircle, scaleManiaScroll, rememberManiaScroll;
public GeneralGameplayOptions()
{
Children = new Drawable[]
@ -16,11 +20,24 @@ namespace osu.Game.Overlays.Options.Gameplay
new SpriteText { Text = "Progress display: TODO dropdown" },
new SpriteText { Text = "Score meter type: TODO dropdown" },
new SpriteText { Text = "Score meter size: TODO slider" },
new BasicCheckBox { LabelText = "Always show key overlay" },
new BasicCheckBox { LabelText = "Show approach circle on first \"Hidden\" object" },
new BasicCheckBox { LabelText = "Scale osu!mania scroll speed with BPM" },
new BasicCheckBox { LabelText = "Remember osu!mania scroll speed per beatmap" },
keyOverlay = new CheckBoxOption { LabelText = "Always show key overlay" },
hiddenApproachCircle = new CheckBoxOption { LabelText = "Show approach circle on first \"Hidden\" object" },
scaleManiaScroll = new CheckBoxOption { LabelText = "Scale osu!mania scroll speed with BPM" },
rememberManiaScroll = new CheckBoxOption { LabelText = "Remember osu!mania scroll speed per beatmap" },
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
keyOverlay.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.KeyOverlay);
hiddenApproachCircle.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.HiddenShowFirstApproach);
scaleManiaScroll.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ManiaSpeedBPMScale);
rememberManiaScroll.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.UsePerBeatmapManiaSpeed);
}
}
}
}

View File

@ -6,7 +6,7 @@ namespace osu.Game.Overlays.Options.Gameplay
public class SongSelectGameplayOptions : OptionsSubsection
{
protected override string Header => "Song Select";
public SongSelectGameplayOptions()
{
Children = new Drawable[]

View File

@ -7,7 +7,7 @@ namespace osu.Game.Overlays.Options.General
{
protected override string Header => "General";
public override FontAwesome Icon => FontAwesome.fa_gear;
public GeneralSection()
{
Children = new Drawable[]

View File

@ -1,6 +1,7 @@
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.General
{
@ -8,7 +9,7 @@ namespace osu.Game.Overlays.Options.General
{
protected override string Header => "Language";
private CheckBoxOption showUnicode, altChatFont;
public LanguageOptions()
{
Children = new Drawable[]
@ -18,15 +19,15 @@ namespace osu.Game.Overlays.Options.General
altChatFont = new CheckBoxOption { LabelText = "Use alternative font for chat display" },
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
showUnicode.Bindable = osuGame.Config.GetBindable<bool>(Configuration.OsuConfig.ShowUnicode);
altChatFont.Bindable = osuGame.Config.GetBindable<bool>(Configuration.OsuConfig.AlternativeChatFont);
showUnicode.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ShowUnicode);
altChatFont.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AlternativeChatFont);
}
}
}

View File

@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Options.General
{
private Container loginForm;
protected override string Header => "Sign In";
public LoginOptions()
{
Children = new[]
@ -26,7 +26,7 @@ namespace osu.Game.Overlays.Options.General
}
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
@ -38,7 +38,7 @@ namespace osu.Game.Overlays.Options.General
new LoginForm(osuGame.API)
};
}
class LoginForm : FlowContainer
{
public LoginForm(APIAccess api)

View File

@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Options.General
{
private BasicStorage storage;
protected override string Header => "Updates";
public UpdateOptions()
{
Children = new Drawable[]
@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Options.General
}
};
}
protected override void Load(BaseGame game)
{
base.Load(game);

View File

@ -1,26 +1,47 @@
using osu.Framework.Graphics;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Graphics
{
public class DetailOptions : OptionsSubsection
{
protected override string Header => "Detail Settings";
protected override string Header => "Detail Settings";
private CheckBoxOption snakingSliders, backgroundVideo, storyboards, comboBursts,
hitLighting, shaders, softeningFilter;
public DetailOptions()
{
Children = new Drawable[]
{
new BasicCheckBox { LabelText = "Snaking sliders" },
new BasicCheckBox { LabelText = "Background video" },
new BasicCheckBox { LabelText = "Storyboards" },
new BasicCheckBox { LabelText = "Combo bursts" },
new BasicCheckBox { LabelText = "Hit lighting" },
new BasicCheckBox { LabelText = "Shaders" },
new BasicCheckBox { LabelText = "Softening filter" },
snakingSliders = new CheckBoxOption { LabelText = "Snaking sliders" },
backgroundVideo = new CheckBoxOption { LabelText = "Background video" },
storyboards = new CheckBoxOption { LabelText = "Storyboards" },
comboBursts = new CheckBoxOption { LabelText = "Combo bursts" },
hitLighting = new CheckBoxOption { LabelText = "Hit lighting" },
shaders = new CheckBoxOption { LabelText = "Shaders" },
softeningFilter = new CheckBoxOption { LabelText = "Softening filter" },
new SpriteText { Text = "Screenshot format TODO: dropdown" }
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
snakingSliders.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.SnakingSliders);
backgroundVideo.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Video);
storyboards.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ShowStoryboard);
comboBursts.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ComboBurst);
hitLighting.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.HitLighting);
shaders.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Bloom);
softeningFilter.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.BloomSoftening);
}
}
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Overlays.Options.Graphics
{
protected override string Header => "Graphics";
public override FontAwesome Icon => FontAwesome.fa_laptop;
public GraphicsSection()
{
Children = new Drawable[]

View File

@ -1,25 +1,40 @@
using osu.Framework.Graphics;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Graphics
{
public class LayoutOptions : OptionsSubsection
{
protected override string Header => "Layout";
protected override string Header => "Layout";
private CheckBoxOption fullscreen, letterboxing;
public LayoutOptions()
{
Children = new Drawable[]
{
new SpriteText { Text = "Resolution: TODO dropdown" },
new BasicCheckBox { LabelText = "Fullscreen mode" },
new BasicCheckBox { LabelText = "Letterboxing" },
fullscreen = new CheckBoxOption { LabelText = "Fullscreen mode" },
letterboxing = new CheckBoxOption { LabelText = "Letterboxing" },
new SpriteText { Text = "Horizontal position" },
new SpriteText { Text = "TODO: slider" },
new SpriteText { Text = "Vertical position" },
new SpriteText { Text = "TODO: slider" },
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
fullscreen.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Fullscreen);
letterboxing.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Letterboxing);
}
}
}
}

View File

@ -1,21 +1,39 @@
using osu.Framework.Graphics.UserInterface;
using osu.Framework;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Graphics
{
public class MainMenuOptions : OptionsSubsection
{
protected override string Header => "Main Menu";
protected override string Header => "Main Menu";
private CheckBoxOption snow, parallax, tips, voices, musicTheme;
public MainMenuOptions()
{
Children = new[]
{
new BasicCheckBox { LabelText = "Snow" },
new BasicCheckBox { LabelText = "Parallax" },
new BasicCheckBox { LabelText = "Menu tips" },
new BasicCheckBox { LabelText = "Interface voices" },
new BasicCheckBox { LabelText = "osu! music theme" },
snow = new CheckBoxOption { LabelText = "Snow" },
parallax = new CheckBoxOption { LabelText = "Parallax" },
tips = new CheckBoxOption { LabelText = "Menu tips" },
voices = new CheckBoxOption { LabelText = "Interface voices" },
musicTheme = new CheckBoxOption { LabelText = "osu! music theme" },
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
snow.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MenuSnow);
parallax.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MenuParallax);
tips.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ShowMenuTips);
voices.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MenuVoice);
musicTheme.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MenuMusic);
}
}
}
}

View File

@ -1,23 +1,39 @@
using osu.Framework.Graphics;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Graphics
{
public class RendererOptions : OptionsSubsection
{
protected override string Header => "Renderer";
protected override string Header => "Renderer";
private CheckBoxOption fpsCounter, reduceDroppedFrames, detectPerformanceIssues;
public RendererOptions()
{
// NOTE: Compatability mode omitted
Children = new Drawable[]
{
new SpriteText { Text = "Frame limiter: TODO dropdown" },
new BasicCheckBox { LabelText = "Show FPS counter" },
new BasicCheckBox { LabelText = "Reduce dropped frames" },
new BasicCheckBox { LabelText = "Detect performance issues" },
fpsCounter = new CheckBoxOption { LabelText = "Show FPS counter" },
reduceDroppedFrames = new CheckBoxOption { LabelText = "Reduce dropped frames" },
detectPerformanceIssues = new CheckBoxOption { LabelText = "Detect performance issues" },
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
fpsCounter.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.FpsCounter);
reduceDroppedFrames.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ForceFrameFlush);
detectPerformanceIssues.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.DetectPerformanceIssues);
}
}
}
}

View File

@ -1,17 +1,31 @@
using osu.Framework.Graphics.UserInterface;
using osu.Framework;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Graphics
{
public class SongSelectGraphicsOptions : OptionsSubsection
{
protected override string Header => "Song Select";
protected override string Header => "Song Select";
private CheckBoxOption showThumbs;
public SongSelectGraphicsOptions()
{
Children = new[]
{
new BasicCheckBox { LabelText = "Show thumbnails" }
showThumbs = new CheckBoxOption { LabelText = "Show thumbnails" }
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
showThumbs.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.SongSelectThumbnails);
}
}
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Overlays.Options.Input
{
protected override string Header => "Input";
public override FontAwesome Icon => FontAwesome.fa_keyboard_o;
public InputSection()
{
Children = new Drawable[]

View File

@ -6,7 +6,7 @@ namespace osu.Game.Overlays.Options.Input
public class KeyboardOptions : OptionsSubsection
{
protected override string Header => "Keyboard";
public KeyboardOptions()
{
Children = new Drawable[]

View File

@ -1,25 +1,43 @@
using osu.Framework.Graphics;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Input
{
public class MouseOptions : OptionsSubsection
{
protected override string Header => "Mouse";
protected override string Header => "Mouse";
private CheckBoxOption rawInput, mapRawInput, disableWheel, disableButtons, enableRipples;
public MouseOptions()
{
Children = new Drawable[]
{
new SpriteText { Text = "Sensitivity: TODO slider" },
new BasicCheckBox { LabelText = "Raw input" },
new BasicCheckBox { LabelText = "Map absolute raw input to the osu! window" },
rawInput = new CheckBoxOption { LabelText = "Raw input" },
mapRawInput = new CheckBoxOption { LabelText = "Map absolute raw input to the osu! window" },
new SpriteText { Text = "Confine mouse cursor: TODO dropdown" },
new BasicCheckBox { LabelText = "Disable mouse wheel in play mode" },
new BasicCheckBox { LabelText = "Disable mouse buttons in play mode" },
new BasicCheckBox { LabelText = "Cursor ripples" },
disableWheel = new CheckBoxOption { LabelText = "Disable mouse wheel in play mode" },
disableButtons = new CheckBoxOption { LabelText = "Disable mouse buttons in play mode" },
enableRipples = new CheckBoxOption { LabelText = "Cursor ripples" },
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
rawInput.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.RawInput);
mapRawInput.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AbsoluteToOsuWindow);
disableWheel.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MouseDisableWheel);
disableButtons.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MouseDisableButtons);
enableRipples.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.CursorRipple);
}
}
}
}

View File

@ -1,19 +1,34 @@
using osu.Framework.Graphics;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Input
{
public class OtherInputOptions : OptionsSubsection
{
protected override string Header => "Other";
protected override string Header => "Other";
private CheckBoxOption tabletSupport, wiimoteSupport;
public OtherInputOptions()
{
Children = new Drawable[]
{
new BasicCheckBox { LabelText = "OS TabletPC support" },
new BasicCheckBox { LabelText = "Wiimote/TaTaCon Drum Support" },
tabletSupport = new CheckBoxOption { LabelText = "OS TabletPC support" },
wiimoteSupport = new CheckBoxOption { LabelText = "Wiimote/TaTaCon Drum Support" },
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
tabletSupport.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Tablet);
wiimoteSupport.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Wiimote);
}
}
}
}

View File

@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Options
{
protected override string Header => "Maintenance";
public override FontAwesome Icon => FontAwesome.fa_wrench;
public MaintenanceSection()
{
content.Spacing = new Vector2(0, 5);

View File

@ -1,26 +1,43 @@
using osu.Framework.Graphics;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Online
{
public class InGameChatOptions : OptionsSubsection
{
protected override string Header => "In-game Chat";
protected override string Header => "In-game Chat";
private CheckBoxOption filterWords, filterForeign, logPMs, blockPMs;
public InGameChatOptions()
{
Children = new Drawable[]
{
new BasicCheckBox { LabelText = "Filter offensive words" },
new BasicCheckBox { LabelText = "Filter foreign characters" },
new BasicCheckBox { LabelText = "Log private messages" },
new BasicCheckBox { LabelText = "Block private messages from non-friends" },
filterWords = new CheckBoxOption { LabelText = "Filter offensive words" },
filterForeign = new CheckBoxOption { LabelText = "Filter foreign characters" },
logPMs = new CheckBoxOption { LabelText = "Log private messages" },
blockPMs = new CheckBoxOption { LabelText = "Block private messages from non-friends" },
new SpriteText { Text = "Chat ignore list (space-seperated list)" },
new TextBox { Height = 20, RelativeSizeAxes = Axes.X },
new SpriteText { Text = "Chat highlight words (space-seperated list)" },
new TextBox { Height = 20, RelativeSizeAxes = Axes.X },
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
filterWords.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ChatFilter);
filterForeign.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ChatRemoveForeign);
logPMs.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.LogPrivateMessages);
blockPMs.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.BlockNonFriendPM);
}
}
}
}

View File

@ -1,23 +1,43 @@
using osu.Framework.Graphics;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Online
{
public class NotificationsOptions : OptionsSubsection
{
protected override string Header => "Notifications";
private CheckBoxOption chatTicker, notifyMention, notifyChat, audibleNotification,
notificationsDuringGameplay, notifyFriendStatus;
public NotificationsOptions()
{
Children = new Drawable[]
{
new BasicCheckBox { LabelText = "Enable chat ticker" },
new BasicCheckBox { LabelText = "Show a notification popup when someone says your name" },
new BasicCheckBox { LabelText = "Show chat message notifications" },
new BasicCheckBox { LabelText = "Play a sound when someone says your name" },
new BasicCheckBox { LabelText = "Show notification popups instantly during gameplay" },
new BasicCheckBox { LabelText = "Show notification popups when friends change status" },
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" },
};
}
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);
}
}
}
}

View File

@ -1,21 +1,38 @@
using osu.Framework.Graphics;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Online
{
public class OnlineIntegrationOptions : OptionsSubsection
{
protected override string Header => "Integration";
protected override string Header => "Integration";
private CheckBoxOption yahoo, msn, autoDirect, noVideo;
public OnlineIntegrationOptions()
{
Children = new Drawable[]
{
new BasicCheckBox { LabelText = "Integrate with Yahoo! status display" },
new BasicCheckBox { LabelText = "Integrate with MSN Live status display" },
new BasicCheckBox { LabelText = "Automatically start osu!direct downloads" },
new BasicCheckBox { LabelText = "Prefer no-video downloads" },
yahoo = new CheckBoxOption { LabelText = "Integrate with Yahoo! status display" },
msn = new CheckBoxOption { LabelText = "Integrate with MSN Live status display" },
autoDirect = new CheckBoxOption { LabelText = "Automatically start osu!direct downloads" },
noVideo = new CheckBoxOption { LabelText = "Prefer no-video downloads" },
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
yahoo.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.YahooIntegration);
msn.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MsnIntegration);
autoDirect.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AutomaticDownload);
noVideo.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AutomaticDownloadNoVideo);
}
}
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Overlays.Options.Online
{
protected override string Header => "Online";
public override FontAwesome Icon => FontAwesome.fa_globe;
public OnlineSection()
{
Children = new Drawable[]

View File

@ -1,20 +1,34 @@
using osu.Framework.Graphics;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Online
{
public class PrivacyOptions : OptionsSubsection
{
protected override string Header => "Privacy";
private CheckBoxOption shareCity, allowInvites;
public PrivacyOptions()
{
Children = new Drawable[]
{
new BasicCheckBox { LabelText = "Share your city location with others" },
new BasicCheckBox { LabelText = "Allow multiplayer game invites from all users" },
new BasicCheckBox { LabelText = "Block private messages from non-friends" },
shareCity = new CheckBoxOption { LabelText = "Share your city location with others" },
allowInvites = new CheckBoxOption { LabelText = "Allow multiplayer game invites from all users" },
};
}
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);
}
}
}
}

View File

@ -9,9 +9,9 @@ namespace osu.Game.Overlays.Options
{
private Container<Drawable> content;
protected override Container<Drawable> Content => content;
protected abstract string Header { get; }
public OptionsSubsection()
{
RelativeSizeAxes = Axes.X;

View File

@ -1,7 +1,9 @@
using OpenTK;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
@ -10,7 +12,9 @@ namespace osu.Game.Overlays.Options
public class SkinSection : OptionsSection
{
protected override string Header => "Skin";
public override FontAwesome Icon => FontAwesome.fa_paint_brush;
public override FontAwesome Icon => FontAwesome.fa_paint_brush;
private CheckBoxOption ignoreSkins, useSkinSoundSamples, useTaikoSkin, useSkinCursor, autoCursorSize;
public SkinSection()
{
@ -34,13 +38,27 @@ namespace osu.Game.Overlays.Options
RelativeSizeAxes = Axes.X,
Text = "Export as .osk",
},
new BasicCheckBox { LabelText = "Ignore all beatmap skins" },
new BasicCheckBox { LabelText = "Use skin's sound samples" },
new BasicCheckBox { LabelText = "Use Taiko skin for Taiko mode" },
new BasicCheckBox { LabelText = "Always use skin cursor" },
ignoreSkins = new CheckBoxOption { LabelText = "Ignore all beatmap skins" },
useSkinSoundSamples = new CheckBoxOption { LabelText = "Use skin's sound samples" },
useTaikoSkin = new CheckBoxOption { LabelText = "Use Taiko skin for Taiko mode" },
useSkinCursor = new CheckBoxOption { LabelText = "Always use skin cursor" },
new SpriteText { Text = "Cursor size: TODO slider" },
new BasicCheckBox { LabelText = "Automatic cursor size" },
autoCursorSize = new CheckBoxOption { LabelText = "Automatic cursor size" },
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
ignoreSkins.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSkins);
useSkinSoundSamples.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.SkinSamples);
useTaikoSkin.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.UseTaikoSkin);
useSkinCursor.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.UseSkinCursor);
autoCursorSize.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AutomaticCursorSizing);
}
}
}
}