From 756fd78a8897c3556b44e8ba8b692ba5a0012ff5 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 7 Feb 2017 13:52:19 +0900 Subject: [PATCH] Fix incorrect line endings. --- .../Platform/TestStorage.cs | 56 ++-- .../Tests/TestCasePauseOverlay.cs | 72 ++--- osu.Game/Beatmaps/Drawables/DifficultyIcon.cs | 134 ++++---- osu.Game/Beatmaps/Formats/BeatmapDecoder.cs | 2 +- osu.Game/Configuration/ProgressBarType.cs | 24 +- osu.Game/Configuration/RankingType.cs | 26 +- osu.Game/Configuration/ReleaseStream.cs | 20 +- osu.Game/Configuration/ScoreMeterType.cs | 18 +- osu.Game/Database/BeatmapSetInfo.cs | 64 ++-- .../UserInterface/LoadingAnimation.cs | 26 +- osu.Game/Graphics/UserInterface/OsuButton.cs | 80 ++--- osu.Game/Overlays/Options/OptionTextBox.cs | 90 +++--- .../Overlays/Options/OptionsSubsection.cs | 88 +++--- .../Sections/Audio/AudioDevicesOptions.cs | 34 +- .../Options/Sections/Audio/OffsetOptions.cs | 34 +- .../Overlays/Options/Sections/AudioSection.cs | 50 +-- .../Sections/Gameplay/SongSelectOptions.cs | 32 +- .../Options/Sections/GameplaySection.cs | 46 +-- .../Options/Sections/General/LoginOptions.cs | 296 +++++++++--------- .../Options/Sections/GeneralSection.cs | 50 +-- .../Options/Sections/GraphicsSection.cs | 56 ++-- .../Options/Sections/Input/KeyboardOptions.cs | 58 ++-- .../Overlays/Options/Sections/InputSection.cs | 52 +-- .../Options/Sections/MaintenanceSection.cs | 98 +++--- .../Sections/Online/InGameChatOptions.cs | 94 +++--- .../Options/Sections/OnlineSection.cs | 48 +-- .../Overlays/Options/Sections/SkinSection.cs | 148 ++++----- osu.Game/Overlays/Pause/PauseProgressBar.cs | 284 ++++++++--------- osu.Game/Overlays/Pause/PauseProgressGraph.cs | 12 +- osu.Game/Overlays/Pause/ResumeButton.cs | 42 +-- 30 files changed, 1067 insertions(+), 1067 deletions(-) diff --git a/osu.Desktop.VisualTests/Platform/TestStorage.cs b/osu.Desktop.VisualTests/Platform/TestStorage.cs index 95b767a852..ecf12d233a 100644 --- a/osu.Desktop.VisualTests/Platform/TestStorage.cs +++ b/osu.Desktop.VisualTests/Platform/TestStorage.cs @@ -1,29 +1,29 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework; -using osu.Framework.Desktop.Platform; -using SQLite.Net; -using SQLite.Net.Interop; -using SQLite.Net.Platform.Generic; -using SQLite.Net.Platform.Win32; - -namespace osu.Desktop.VisualTests.Platform -{ - public class TestStorage : DesktopStorage - { - public TestStorage(string baseName) : base(baseName) - { - } - - public override SQLiteConnection GetDatabase(string name) - { - ISQLitePlatform platform; - if (RuntimeInfo.IsWindows) - platform = new SQLitePlatformWin32(); - else - platform = new SQLitePlatformGeneric(); - return new SQLiteConnection(platform, $@":memory:"); - } - } +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework; +using osu.Framework.Desktop.Platform; +using SQLite.Net; +using SQLite.Net.Interop; +using SQLite.Net.Platform.Generic; +using SQLite.Net.Platform.Win32; + +namespace osu.Desktop.VisualTests.Platform +{ + public class TestStorage : DesktopStorage + { + public TestStorage(string baseName) : base(baseName) + { + } + + public override SQLiteConnection GetDatabase(string name) + { + ISQLitePlatform platform; + if (RuntimeInfo.IsWindows) + platform = new SQLitePlatformWin32(); + else + platform = new SQLitePlatformGeneric(); + return new SQLiteConnection(platform, $@":memory:"); + } + } } \ No newline at end of file diff --git a/osu.Desktop.VisualTests/Tests/TestCasePauseOverlay.cs b/osu.Desktop.VisualTests/Tests/TestCasePauseOverlay.cs index dbcd1b93af..23c7cc45cf 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePauseOverlay.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePauseOverlay.cs @@ -1,44 +1,44 @@ -using System; -using OpenTK.Graphics; -using osu.Framework.Logging; -using osu.Framework.Graphics; -using osu.Game.Overlays.Pause; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.Colour; +using System; +using OpenTK.Graphics; +using osu.Framework.Logging; +using osu.Framework.Graphics; +using osu.Game.Overlays.Pause; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Colour; using osu.Framework.GameModes.Testing; using osu.Framework.Graphics.UserInterface; -namespace osu.Desktop.VisualTests.Tests -{ - class TestCasePauseOverlay : TestCase - { - public override string Name => @"PauseOverlay"; - - public override string Description => @"Tests the pause overlay"; - - private PauseOverlay pauseOverlay; - private int retryCount; - - public override void Reset() - { - base.Reset(); - - Add(pauseOverlay = new PauseOverlay - { - Depth = -1, - OnResume = () => Logger.Log(@"Resume"), - OnRetry = () => Logger.Log(@"Retry"), - OnQuit = () => Logger.Log(@"Quit") - }); - AddButton("Pause", pauseOverlay.Show); +namespace osu.Desktop.VisualTests.Tests +{ + class TestCasePauseOverlay : TestCase + { + public override string Name => @"PauseOverlay"; + + public override string Description => @"Tests the pause overlay"; + + private PauseOverlay pauseOverlay; + private int retryCount; + + public override void Reset() + { + base.Reset(); + + Add(pauseOverlay = new PauseOverlay + { + Depth = -1, + OnResume = () => Logger.Log(@"Resume"), + OnRetry = () => Logger.Log(@"Retry"), + OnQuit = () => Logger.Log(@"Quit") + }); + AddButton("Pause", pauseOverlay.Show); AddButton("Add Retry", delegate { retryCount++; pauseOverlay.Retries = retryCount; - }); - - retryCount = 0; + }); + + retryCount = 0; } - } -} + } +} diff --git a/osu.Game/Beatmaps/Drawables/DifficultyIcon.cs b/osu.Game/Beatmaps/Drawables/DifficultyIcon.cs index 0d1a3b7320..298bbc4853 100644 --- a/osu.Game/Beatmaps/Drawables/DifficultyIcon.cs +++ b/osu.Game/Beatmaps/Drawables/DifficultyIcon.cs @@ -1,55 +1,55 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Colour; -using osu.Framework.Graphics.Containers; -using osu.Game.Database; -using osu.Game.Graphics; -using osu.Game.Modes; -using OpenTK; -using OpenTK.Graphics; - +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Colour; +using osu.Framework.Graphics.Containers; +using osu.Game.Database; +using osu.Game.Graphics; +using osu.Game.Modes; +using OpenTK; +using OpenTK.Graphics; + namespace osu.Game.Beatmaps.Drawables { - class DifficultyIcon : Container - { - private readonly BeatmapInfo beatmap; - private OsuColour palette; - - public DifficultyIcon(BeatmapInfo beatmap) - { - this.beatmap = beatmap; - const float size = 20; - Size = new Vector2(size); - } - - [BackgroundDependencyLoader] + class DifficultyIcon : Container + { + private readonly BeatmapInfo beatmap; + private OsuColour palette; + + public DifficultyIcon(BeatmapInfo beatmap) + { + this.beatmap = beatmap; + const float size = 20; + Size = new Vector2(size); + } + + [BackgroundDependencyLoader] private void load(OsuColour palette) { this.palette = palette; Children = new[] - { - new TextAwesome - { - Anchor = Anchor.Centre, - TextSize = Size.X, - Colour = getColour(beatmap), - Icon = FontAwesome.fa_circle - }, - new TextAwesome - { - Anchor = Anchor.Centre, - TextSize = Size.X, - Colour = Color4.White, - Icon = Ruleset.GetRuleset(beatmap.Mode).Icon - } + { + new TextAwesome + { + Anchor = Anchor.Centre, + TextSize = Size.X, + Colour = getColour(beatmap), + Icon = FontAwesome.fa_circle + }, + new TextAwesome + { + Anchor = Anchor.Centre, + TextSize = Size.X, + Colour = Color4.White, + Icon = Ruleset.GetRuleset(beatmap.Mode).Icon + } }; - } - + } + enum DifficultyRating { Easy, @@ -57,35 +57,35 @@ namespace osu.Game.Beatmaps.Drawables Hard, Insane, Expert - } - + } + private DifficultyRating getDifficultyRating(BeatmapInfo beatmap) { var rating = beatmap.StarDifficulty; - if (rating < 1.5) return DifficultyRating.Easy; - if (rating < 2.25) return DifficultyRating.Normal; - if (rating < 3.75) return DifficultyRating.Hard; - if (rating < 5.25) return DifficultyRating.Insane; - return DifficultyRating.Expert; - } - - private Color4 getColour(BeatmapInfo beatmap) + if (rating < 1.5) return DifficultyRating.Easy; + if (rating < 2.25) return DifficultyRating.Normal; + if (rating < 3.75) return DifficultyRating.Hard; + if (rating < 5.25) return DifficultyRating.Insane; + return DifficultyRating.Expert; + } + + private Color4 getColour(BeatmapInfo beatmap) { - switch (getDifficultyRating(beatmap)) - { - case DifficultyRating.Easy: + switch (getDifficultyRating(beatmap)) + { + case DifficultyRating.Easy: return palette.Green; - default: - case DifficultyRating.Normal: - return palette.Yellow; - case DifficultyRating.Hard: - return palette.Pink; - case DifficultyRating.Insane: - return palette.Purple; - case DifficultyRating.Expert: - return palette.Gray0; + default: + case DifficultyRating.Normal: + return palette.Yellow; + case DifficultyRating.Hard: + return palette.Pink; + case DifficultyRating.Insane: + return palette.Purple; + case DifficultyRating.Expert: + return palette.Gray0; } - } + } } } \ No newline at end of file diff --git a/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs b/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs index cd55f36ae3..82de5a2ed2 100644 --- a/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs +++ b/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs @@ -63,4 +63,4 @@ namespace osu.Game.Beatmaps.Formats } } } -} +} diff --git a/osu.Game/Configuration/ProgressBarType.cs b/osu.Game/Configuration/ProgressBarType.cs index e252c84558..b77c2ee0d7 100644 --- a/osu.Game/Configuration/ProgressBarType.cs +++ b/osu.Game/Configuration/ProgressBarType.cs @@ -1,16 +1,16 @@ using System; using System.ComponentModel; -namespace osu.Game.Configuration -{ - public enum ProgressBarType - { - Off, - Pie, - [Description("Top Right")] - TopRight, - [Description("Bottom Right")] - BottomRight, - Bottom - } +namespace osu.Game.Configuration +{ + public enum ProgressBarType + { + Off, + Pie, + [Description("Top Right")] + TopRight, + [Description("Bottom Right")] + BottomRight, + Bottom + } } \ No newline at end of file diff --git a/osu.Game/Configuration/RankingType.cs b/osu.Game/Configuration/RankingType.cs index e2f0b4cd00..08bc271a36 100644 --- a/osu.Game/Configuration/RankingType.cs +++ b/osu.Game/Configuration/RankingType.cs @@ -1,16 +1,16 @@ -using System; +using System; using System.ComponentModel; -namespace osu.Game.Configuration -{ - public enum RankingType - { - Local, - [Description("Global")] - Top, - [Description("Selected Mods")] - SelectedMod, - Friends, - Country - } +namespace osu.Game.Configuration +{ + public enum RankingType + { + Local, + [Description("Global")] + Top, + [Description("Selected Mods")] + SelectedMod, + Friends, + Country + } } \ No newline at end of file diff --git a/osu.Game/Configuration/ReleaseStream.cs b/osu.Game/Configuration/ReleaseStream.cs index a03b2376a3..02cc7333ef 100644 --- a/osu.Game/Configuration/ReleaseStream.cs +++ b/osu.Game/Configuration/ReleaseStream.cs @@ -1,11 +1,11 @@ -using System; -namespace osu.Game.Configuration -{ - public enum ReleaseStream - { - Lazer, - //Stable40, - //Beta40, - //Stable - } +using System; +namespace osu.Game.Configuration +{ + public enum ReleaseStream + { + Lazer, + //Stable40, + //Beta40, + //Stable + } } \ No newline at end of file diff --git a/osu.Game/Configuration/ScoreMeterType.cs b/osu.Game/Configuration/ScoreMeterType.cs index 786de6b6bf..6077e91539 100644 --- a/osu.Game/Configuration/ScoreMeterType.cs +++ b/osu.Game/Configuration/ScoreMeterType.cs @@ -1,10 +1,10 @@ -using System; -namespace osu.Game.Configuration -{ - public enum ScoreMeterType - { - None, - Colour, - Error - } +using System; +namespace osu.Game.Configuration +{ + public enum ScoreMeterType + { + None, + Colour, + Error + } } \ No newline at end of file diff --git a/osu.Game/Database/BeatmapSetInfo.cs b/osu.Game/Database/BeatmapSetInfo.cs index 60637f8736..2ff9626941 100644 --- a/osu.Game/Database/BeatmapSetInfo.cs +++ b/osu.Game/Database/BeatmapSetInfo.cs @@ -1,32 +1,32 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; -using System.Collections.Generic; -using SQLite.Net.Attributes; -using SQLiteNetExtensions.Attributes; - -namespace osu.Game.Database -{ - public class BeatmapSetInfo - { - [PrimaryKey, AutoIncrement] - public int ID { get; set; } - - public int? OnlineBeatmapSetID { get; set; } = null; - - [OneToOne(CascadeOperations = CascadeOperation.All)] - public BeatmapMetadata Metadata { get; set; } - - [NotNull, ForeignKey(typeof(BeatmapMetadata))] - public int BeatmapMetadataID { get; set; } - - [OneToMany(CascadeOperations = CascadeOperation.All)] - public List Beatmaps { get; set; } - - public string Hash { get; set; } - - public string Path { get; set; } - } -} - +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using System.Collections.Generic; +using SQLite.Net.Attributes; +using SQLiteNetExtensions.Attributes; + +namespace osu.Game.Database +{ + public class BeatmapSetInfo + { + [PrimaryKey, AutoIncrement] + public int ID { get; set; } + + public int? OnlineBeatmapSetID { get; set; } = null; + + [OneToOne(CascadeOperations = CascadeOperation.All)] + public BeatmapMetadata Metadata { get; set; } + + [NotNull, ForeignKey(typeof(BeatmapMetadata))] + public int BeatmapMetadataID { get; set; } + + [OneToMany(CascadeOperations = CascadeOperation.All)] + public List Beatmaps { get; set; } + + public string Hash { get; set; } + + public string Path { get; set; } + } +} + diff --git a/osu.Game/Graphics/UserInterface/LoadingAnimation.cs b/osu.Game/Graphics/UserInterface/LoadingAnimation.cs index 49887dd8db..0772ea912f 100644 --- a/osu.Game/Graphics/UserInterface/LoadingAnimation.cs +++ b/osu.Game/Graphics/UserInterface/LoadingAnimation.cs @@ -1,16 +1,16 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; using osu.Framework.Graphics.Sprites; -namespace osu.Game.Graphics.UserInterface -{ - public class LoadingAnimation : SpriteText - { - public LoadingAnimation() - { - Text = "Loading"; - } - } +namespace osu.Game.Graphics.UserInterface +{ + public class LoadingAnimation : SpriteText + { + public LoadingAnimation() + { + Text = "Loading"; + } + } } \ No newline at end of file diff --git a/osu.Game/Graphics/UserInterface/OsuButton.cs b/osu.Game/Graphics/UserInterface/OsuButton.cs index ed7b9ffb29..9b34a8462d 100644 --- a/osu.Game/Graphics/UserInterface/OsuButton.cs +++ b/osu.Game/Graphics/UserInterface/OsuButton.cs @@ -1,27 +1,27 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; -using OpenTK.Graphics; -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.Transformations; -using osu.Framework.Graphics.UserInterface; +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using OpenTK.Graphics; +using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Transformations; +using osu.Framework.Graphics.UserInterface; using osu.Framework.Input; -using osu.Game.Graphics.Backgrounds; -using osu.Game.Graphics.Sprites; -using osu.Game.Overlays; - -namespace osu.Game.Graphics.UserInterface -{ - public class OsuButton : Button - { - private Box hover; - - public OsuButton() - { - Height = 40; +using osu.Game.Graphics.Backgrounds; +using osu.Game.Graphics.Sprites; +using osu.Game.Overlays; + +namespace osu.Game.Graphics.UserInterface +{ + public class OsuButton : Button + { + private Box hover; + + public OsuButton() + { + Height = 40; } protected override SpriteText CreateText() => new OsuSpriteText @@ -32,14 +32,14 @@ namespace osu.Game.Graphics.UserInterface Font = @"Exo2.0-Bold", }; - [BackgroundDependencyLoader] - private void load(OsuColour colours) - { + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { Colour = colours.BlueDark; - Content.Masking = true; - Content.CornerRadius = 5; - + Content.Masking = true; + Content.CornerRadius = 5; + Add(new Drawable[] { new Triangles @@ -55,31 +55,31 @@ namespace osu.Game.Graphics.UserInterface Colour = Color4.White.Opacity(0.1f), Alpha = 0, }, - }); - } - + }); + } + protected override bool OnHover(InputState state) { hover.FadeIn(200); return base.OnHover(state); - } - + } + protected override void OnHoverLost(InputState state) { hover.FadeOut(200); base.OnHoverLost(state); - } - + } + protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) { Content.ScaleTo(0.9f, 4000, EasingTypes.OutQuint); return base.OnMouseDown(state, args); - } - + } + protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) { Content.ScaleTo(1, 1000, EasingTypes.OutElastic); return base.OnMouseUp(state, args); - } - } + } + } } \ No newline at end of file diff --git a/osu.Game/Overlays/Options/OptionTextBox.cs b/osu.Game/Overlays/Options/OptionTextBox.cs index 101ba2c0c9..ce39b0f071 100644 --- a/osu.Game/Overlays/Options/OptionTextBox.cs +++ b/osu.Game/Overlays/Options/OptionTextBox.cs @@ -1,53 +1,53 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; -using osu.Framework.Configuration; -using osu.Framework.Graphics.UserInterface; -using osu.Game.Graphics.UserInterface; - -namespace osu.Game.Overlays.Options -{ - public class OptionTextBox : OsuTextBox - { - private Bindable bindable; - - public Bindable Bindable - { - set - { - if (bindable != null) - bindable.ValueChanged -= bindableValueChanged; - bindable = value; - if (bindable != null) - { - base.Text = bindable.Value; - bindable.ValueChanged += bindableValueChanged; - } - } - } - +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using osu.Framework.Configuration; +using osu.Framework.Graphics.UserInterface; +using osu.Game.Graphics.UserInterface; + +namespace osu.Game.Overlays.Options +{ + public class OptionTextBox : OsuTextBox + { + private Bindable bindable; + + public Bindable Bindable + { + set + { + if (bindable != null) + bindable.ValueChanged -= bindableValueChanged; + bindable = value; + if (bindable != null) + { + base.Text = bindable.Value; + bindable.ValueChanged += bindableValueChanged; + } + } + } + protected override string InternalText { get { return base.InternalText; } set { - base.InternalText = value; - if (bindable != null) + base.InternalText = value; + if (bindable != null) bindable.Value = value; } - } - - private void bindableValueChanged(object sender, EventArgs e) - { - Text = bindable.Value; - } - - protected override void Dispose(bool isDisposing) - { - if (bindable != null) - bindable.ValueChanged -= bindableValueChanged; - base.Dispose(isDisposing); - } - } + } + + private void bindableValueChanged(object sender, EventArgs e) + { + Text = bindable.Value; + } + + protected override void Dispose(bool isDisposing) + { + if (bindable != null) + bindable.ValueChanged -= bindableValueChanged; + base.Dispose(isDisposing); + } + } } \ No newline at end of file diff --git a/osu.Game/Overlays/Options/OptionsSubsection.cs b/osu.Game/Overlays/Options/OptionsSubsection.cs index 42e4b50558..a495d3780a 100644 --- a/osu.Game/Overlays/Options/OptionsSubsection.cs +++ b/osu.Game/Overlays/Options/OptionsSubsection.cs @@ -1,44 +1,44 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using OpenTK; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Primitives; -using osu.Framework.Graphics.Sprites; -using osu.Game.Graphics.Sprites; - -namespace osu.Game.Overlays.Options -{ - public abstract class OptionsSubsection : FlowContainer - { - private Container content; - protected override Container Content => content; - - protected abstract string Header { get; } - - public OptionsSubsection() - { - RelativeSizeAxes = Axes.X; - AutoSizeAxes = Axes.Y; - Direction = FlowDirection.VerticalOnly; - AddInternal(new Drawable[] - { - new OsuSpriteText - { - Text = Header.ToUpper(), - Margin = new MarginPadding { Bottom = 10 }, - Font = @"Exo2.0-Black", - }, - content = new FlowContainer - { - Direction = FlowDirection.VerticalOnly, - RelativeSizeAxes = Axes.X, - AutoSizeAxes = Axes.Y, - Spacing = new Vector2(0, 5), - }, - }); - } - } -} - +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Primitives; +using osu.Framework.Graphics.Sprites; +using osu.Game.Graphics.Sprites; + +namespace osu.Game.Overlays.Options +{ + public abstract class OptionsSubsection : FlowContainer + { + private Container content; + protected override Container Content => content; + + protected abstract string Header { get; } + + public OptionsSubsection() + { + RelativeSizeAxes = Axes.X; + AutoSizeAxes = Axes.Y; + Direction = FlowDirection.VerticalOnly; + AddInternal(new Drawable[] + { + new OsuSpriteText + { + Text = Header.ToUpper(), + Margin = new MarginPadding { Bottom = 10 }, + Font = @"Exo2.0-Black", + }, + content = new FlowContainer + { + Direction = FlowDirection.VerticalOnly, + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Spacing = new Vector2(0, 5), + }, + }); + } + } +} + diff --git a/osu.Game/Overlays/Options/Sections/Audio/AudioDevicesOptions.cs b/osu.Game/Overlays/Options/Sections/Audio/AudioDevicesOptions.cs index b9171cd6f6..a67ce94901 100644 --- a/osu.Game/Overlays/Options/Sections/Audio/AudioDevicesOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Audio/AudioDevicesOptions.cs @@ -1,18 +1,18 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -namespace osu.Game.Overlays.Options.Sections.Audio -{ - public class AudioDevicesOptions : OptionsSubsection - { - protected override string Header => "Devices"; - - public AudioDevicesOptions() - { - Children = new[] - { - new OptionLabel { Text = "Output device: TODO dropdown" } - }; - } - } +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Overlays.Options.Sections.Audio +{ + public class AudioDevicesOptions : OptionsSubsection + { + protected override string Header => "Devices"; + + public AudioDevicesOptions() + { + Children = new[] + { + new OptionLabel { Text = "Output device: TODO dropdown" } + }; + } + } } \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs b/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs index 2f7acdc8c0..877795693f 100644 --- a/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs @@ -1,17 +1,17 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Allocation; -using osu.Framework.Configuration; -using osu.Framework.Graphics; -using osu.Game.Configuration; -using osu.Game.Graphics.UserInterface; - -namespace osu.Game.Overlays.Options.Sections.Audio -{ - public class OffsetOptions : OptionsSubsection - { - protected override string Header => "Offset Adjustment"; +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Allocation; +using osu.Framework.Configuration; +using osu.Framework.Graphics; +using osu.Game.Configuration; +using osu.Game.Graphics.UserInterface; + +namespace osu.Game.Overlays.Options.Sections.Audio +{ + public class OffsetOptions : OptionsSubsection + { + protected override string Header => "Offset Adjustment"; [BackgroundDependencyLoader] private void load(OsuConfigManager config) @@ -29,6 +29,6 @@ namespace osu.Game.Overlays.Options.Sections.Audio Text = "Offset wizard" } }; - } - } -} + } + } +} diff --git a/osu.Game/Overlays/Options/Sections/AudioSection.cs b/osu.Game/Overlays/Options/Sections/AudioSection.cs index 91145bb75d..2824e6d5e5 100644 --- a/osu.Game/Overlays/Options/Sections/AudioSection.cs +++ b/osu.Game/Overlays/Options/Sections/AudioSection.cs @@ -1,26 +1,26 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework; -using osu.Framework.Graphics; -using osu.Game.Graphics; -using osu.Game.Overlays.Options.Sections.Audio; - -namespace osu.Game.Overlays.Options.Sections -{ - public class AudioSection : OptionsSection - { - public override string Header => "Audio"; - public override FontAwesome Icon => FontAwesome.fa_headphones; - - public AudioSection() - { - Children = new Drawable[] - { - new AudioDevicesOptions { Alpha = RuntimeInfo.IsWindows ? 1 : 0 }, - new VolumeOptions(), - new OffsetOptions(), - }; - } - } +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework; +using osu.Framework.Graphics; +using osu.Game.Graphics; +using osu.Game.Overlays.Options.Sections.Audio; + +namespace osu.Game.Overlays.Options.Sections +{ + public class AudioSection : OptionsSection + { + public override string Header => "Audio"; + public override FontAwesome Icon => FontAwesome.fa_headphones; + + public AudioSection() + { + Children = new Drawable[] + { + new AudioDevicesOptions { Alpha = RuntimeInfo.IsWindows ? 1 : 0 }, + new VolumeOptions(), + new OffsetOptions(), + }; + } + } } \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs b/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs index a1ea4e2286..9af10928a1 100644 --- a/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs @@ -1,16 +1,16 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Allocation; -using osu.Framework.Configuration; -using osu.Framework.Graphics; -using osu.Game.Configuration; - -namespace osu.Game.Overlays.Options.Sections.Gameplay -{ - public class SongSelectOptions : OptionsSubsection - { - protected override string Header => "Song Select"; +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Allocation; +using osu.Framework.Configuration; +using osu.Framework.Graphics; +using osu.Game.Configuration; + +namespace osu.Game.Overlays.Options.Sections.Gameplay +{ + public class SongSelectOptions : OptionsSubsection + { + protected override string Header => "Song Select"; [BackgroundDependencyLoader] private void load(OsuConfigManager config) @@ -29,6 +29,6 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay }, }; } - } -} - + } +} + diff --git a/osu.Game/Overlays/Options/Sections/GameplaySection.cs b/osu.Game/Overlays/Options/Sections/GameplaySection.cs index 875fa18fa6..0b3be16ff8 100644 --- a/osu.Game/Overlays/Options/Sections/GameplaySection.cs +++ b/osu.Game/Overlays/Options/Sections/GameplaySection.cs @@ -1,24 +1,24 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Graphics; -using osu.Game.Graphics; -using osu.Game.Overlays.Options.Sections.Gameplay; - -namespace osu.Game.Overlays.Options.Sections -{ - public class GameplaySection : OptionsSection - { - public override string Header => "Gameplay"; - public override FontAwesome Icon => FontAwesome.fa_circle_o; - - public GameplaySection() - { - base.Children = new Drawable[] - { - new Gameplay.GeneralOptions(), - new SongSelectOptions(), - }; - } - } +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Graphics; +using osu.Game.Graphics; +using osu.Game.Overlays.Options.Sections.Gameplay; + +namespace osu.Game.Overlays.Options.Sections +{ + public class GameplaySection : OptionsSection + { + public override string Header => "Gameplay"; + public override FontAwesome Icon => FontAwesome.fa_circle_o; + + public GameplaySection() + { + base.Children = new Drawable[] + { + new Gameplay.GeneralOptions(), + new SongSelectOptions(), + }; + } + } } \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs index 63417c1f0c..d0ba121fef 100644 --- a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs @@ -1,148 +1,148 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Primitives; -using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.UserInterface; -using osu.Game.Configuration; -using osu.Game.Graphics.Sprites; -using osu.Game.Graphics.UserInterface; -using osu.Game.Online.API; -using OpenTK; - -namespace osu.Game.Overlays.Options.Sections.General -{ - public class LoginOptions : OptionsSubsection, IOnlineComponent - { - private bool bounding = true; - - protected override string Header => "Sign In"; - - public override RectangleF BoundingBox => bounding ? base.BoundingBox : RectangleF.Empty; - - public bool Bounding - { - get { return bounding; } - set - { - bounding = value; - Invalidate(Invalidation.Geometry); - } - } - - [BackgroundDependencyLoader(permitNulls: true)] - private void load(APIAccess api) - { - api?.Register(this); - } - - public void APIStateChanged(APIAccess api, APIState state) - { - switch (state) - { - case APIState.Offline: - Children = new Drawable[] - { - new LoginForm() - }; - break; - case APIState.Failing: - Children = new Drawable[] - { - new OsuSpriteText - { - Text = "Connection failing :(", - }, - }; - break; - case APIState.Connecting: - Children = new Drawable[] - { - new OsuSpriteText - { - Text = "Connecting...", - }, - }; - break; - case APIState.Online: - Children = new Drawable[] - { - new OsuSpriteText - { - Text = $"Connected as {api.Username}!", - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Sign out", - Action = api.Logout - } - }; - break; - } - } - - class LoginForm : FlowContainer - { - private TextBox username; - private TextBox password; - private APIAccess api; - - private OsuCheckbox saveUsername; - private OsuCheckbox savePassword; - - private void performLogin() - { - if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text)) - api.Login(username.Text, password.Text); - } - - [BackgroundDependencyLoader(permitNulls: true)] - private void load(APIAccess api, OsuConfigManager config) - { - this.api = api; - Direction = FlowDirection.VerticalOnly; - AutoSizeAxes = Axes.Y; - RelativeSizeAxes = Axes.X; - Spacing = new Vector2(0, 5); - Children = new Drawable[] - { - username = new OsuTextBox - { - RelativeSizeAxes = Axes.X, - Text = api?.Username ?? string.Empty - }, - password = new OsuPasswordTextBox - { - RelativeSizeAxes = Axes.X - }, - saveUsername = new OsuCheckbox - { - LabelText = "Remember username", - Bindable = config.GetBindable(OsuConfig.SaveUsername), - }, - savePassword = new OsuCheckbox - { - LabelText = "Stay logged in", - Bindable = config.GetBindable(OsuConfig.SavePassword), - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Sign in", - Action = performLogin - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Register new account", - //Action = registerLink - } - }; - } - } - } -} +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Primitives; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.UserInterface; +using osu.Game.Configuration; +using osu.Game.Graphics.Sprites; +using osu.Game.Graphics.UserInterface; +using osu.Game.Online.API; +using OpenTK; + +namespace osu.Game.Overlays.Options.Sections.General +{ + public class LoginOptions : OptionsSubsection, IOnlineComponent + { + private bool bounding = true; + + protected override string Header => "Sign In"; + + public override RectangleF BoundingBox => bounding ? base.BoundingBox : RectangleF.Empty; + + public bool Bounding + { + get { return bounding; } + set + { + bounding = value; + Invalidate(Invalidation.Geometry); + } + } + + [BackgroundDependencyLoader(permitNulls: true)] + private void load(APIAccess api) + { + api?.Register(this); + } + + public void APIStateChanged(APIAccess api, APIState state) + { + switch (state) + { + case APIState.Offline: + Children = new Drawable[] + { + new LoginForm() + }; + break; + case APIState.Failing: + Children = new Drawable[] + { + new OsuSpriteText + { + Text = "Connection failing :(", + }, + }; + break; + case APIState.Connecting: + Children = new Drawable[] + { + new OsuSpriteText + { + Text = "Connecting...", + }, + }; + break; + case APIState.Online: + Children = new Drawable[] + { + new OsuSpriteText + { + Text = $"Connected as {api.Username}!", + }, + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Sign out", + Action = api.Logout + } + }; + break; + } + } + + class LoginForm : FlowContainer + { + private TextBox username; + private TextBox password; + private APIAccess api; + + private OsuCheckbox saveUsername; + private OsuCheckbox savePassword; + + private void performLogin() + { + if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text)) + api.Login(username.Text, password.Text); + } + + [BackgroundDependencyLoader(permitNulls: true)] + private void load(APIAccess api, OsuConfigManager config) + { + this.api = api; + Direction = FlowDirection.VerticalOnly; + AutoSizeAxes = Axes.Y; + RelativeSizeAxes = Axes.X; + Spacing = new Vector2(0, 5); + Children = new Drawable[] + { + username = new OsuTextBox + { + RelativeSizeAxes = Axes.X, + Text = api?.Username ?? string.Empty + }, + password = new OsuPasswordTextBox + { + RelativeSizeAxes = Axes.X + }, + saveUsername = new OsuCheckbox + { + LabelText = "Remember username", + Bindable = config.GetBindable(OsuConfig.SaveUsername), + }, + savePassword = new OsuCheckbox + { + LabelText = "Stay logged in", + Bindable = config.GetBindable(OsuConfig.SavePassword), + }, + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Sign in", + Action = performLogin + }, + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Register new account", + //Action = registerLink + } + }; + } + } + } +} diff --git a/osu.Game/Overlays/Options/Sections/GeneralSection.cs b/osu.Game/Overlays/Options/Sections/GeneralSection.cs index 4952dfeef2..c90732f262 100644 --- a/osu.Game/Overlays/Options/Sections/GeneralSection.cs +++ b/osu.Game/Overlays/Options/Sections/GeneralSection.cs @@ -1,25 +1,25 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Graphics; -using osu.Game.Graphics; -using osu.Game.Overlays.Options.Sections.General; - -namespace osu.Game.Overlays.Options.Sections -{ - public class GeneralSection : OptionsSection - { - public override string Header => "General"; - public override FontAwesome Icon => FontAwesome.fa_gear; - - public GeneralSection() - { - Children = new Drawable[] - { - new LanguageOptions(), - new UpdateOptions(), - }; - } - } -} - +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Graphics; +using osu.Game.Graphics; +using osu.Game.Overlays.Options.Sections.General; + +namespace osu.Game.Overlays.Options.Sections +{ + public class GeneralSection : OptionsSection + { + public override string Header => "General"; + public override FontAwesome Icon => FontAwesome.fa_gear; + + public GeneralSection() + { + Children = new Drawable[] + { + new LanguageOptions(), + new UpdateOptions(), + }; + } + } +} + diff --git a/osu.Game/Overlays/Options/Sections/GraphicsSection.cs b/osu.Game/Overlays/Options/Sections/GraphicsSection.cs index 2f5b7fad64..1ca7bc5a83 100644 --- a/osu.Game/Overlays/Options/Sections/GraphicsSection.cs +++ b/osu.Game/Overlays/Options/Sections/GraphicsSection.cs @@ -1,28 +1,28 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Graphics; -using osu.Game.Graphics; -using osu.Game.Overlays.Options.Sections.Graphics; - -namespace osu.Game.Overlays.Options.Sections -{ - public class GraphicsSection : OptionsSection - { - public override string Header => "Graphics"; - public override FontAwesome Icon => FontAwesome.fa_laptop; - - public GraphicsSection() - { - Children = new Drawable[] - { - new RendererOptions(), - new LayoutOptions(), - new DetailOptions(), - new MainMenuOptions(), - new SongSelectGraphicsOptions(), - }; - } - } -} - +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Graphics; +using osu.Game.Graphics; +using osu.Game.Overlays.Options.Sections.Graphics; + +namespace osu.Game.Overlays.Options.Sections +{ + public class GraphicsSection : OptionsSection + { + public override string Header => "Graphics"; + public override FontAwesome Icon => FontAwesome.fa_laptop; + + public GraphicsSection() + { + Children = new Drawable[] + { + new RendererOptions(), + new LayoutOptions(), + new DetailOptions(), + new MainMenuOptions(), + new SongSelectGraphicsOptions(), + }; + } + } +} + diff --git a/osu.Game/Overlays/Options/Sections/Input/KeyboardOptions.cs b/osu.Game/Overlays/Options/Sections/Input/KeyboardOptions.cs index cdd7924110..20e5d5f094 100644 --- a/osu.Game/Overlays/Options/Sections/Input/KeyboardOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Input/KeyboardOptions.cs @@ -1,30 +1,30 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Graphics; -using osu.Game.Graphics.UserInterface; - -namespace osu.Game.Overlays.Options.Sections.Input -{ - public class KeyboardOptions : OptionsSubsection - { - protected override string Header => "Keyboard"; - - public KeyboardOptions() - { - Children = new Drawable[] - { - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Change keyboard bindings" - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "osu!mania layout" - } - }; - } - } +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Graphics; +using osu.Game.Graphics.UserInterface; + +namespace osu.Game.Overlays.Options.Sections.Input +{ + public class KeyboardOptions : OptionsSubsection + { + protected override string Header => "Keyboard"; + + public KeyboardOptions() + { + Children = new Drawable[] + { + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Change keyboard bindings" + }, + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "osu!mania layout" + } + }; + } + } } \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/InputSection.cs b/osu.Game/Overlays/Options/Sections/InputSection.cs index f21dd81cb4..c8c4a8a8e2 100644 --- a/osu.Game/Overlays/Options/Sections/InputSection.cs +++ b/osu.Game/Overlays/Options/Sections/InputSection.cs @@ -1,26 +1,26 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Graphics; -using osu.Game.Graphics; -using osu.Game.Overlays.Options.Sections.Input; - -namespace osu.Game.Overlays.Options.Sections -{ - public class InputSection : OptionsSection - { - public override string Header => "Input"; - public override FontAwesome Icon => FontAwesome.fa_keyboard_o; - - public InputSection() - { - Children = new Drawable[] - { - new MouseOptions(), - new KeyboardOptions(), - new OtherInputOptions(), - }; - } - } -} - +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Graphics; +using osu.Game.Graphics; +using osu.Game.Overlays.Options.Sections.Input; + +namespace osu.Game.Overlays.Options.Sections +{ + public class InputSection : OptionsSection + { + public override string Header => "Input"; + public override FontAwesome Icon => FontAwesome.fa_keyboard_o; + + public InputSection() + { + Children = new Drawable[] + { + new MouseOptions(), + new KeyboardOptions(), + new OtherInputOptions(), + }; + } + } +} + diff --git a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs index 4347c839a6..8cf1421420 100644 --- a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs +++ b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs @@ -1,50 +1,50 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Graphics; -using osu.Game.Graphics; -using osu.Game.Graphics.UserInterface; -using OpenTK; - -namespace osu.Game.Overlays.Options.Sections -{ - public class MaintenanceSection : OptionsSection - { - public override string Header => "Maintenance"; - public override FontAwesome Icon => FontAwesome.fa_wrench; - - public MaintenanceSection() - { - content.Spacing = new Vector2(0, 5); - Children = new Drawable[] - { - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Delete all unranked maps", - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Repair folder permissions", - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Mark all maps as played", - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Run osu! updater", - }, - new OptionLabel - { - Text = "TODO: osu version here", - Anchor = Anchor.TopCentre, - Origin = Anchor.TopCentre, - }, - }; - } - } +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Graphics; +using osu.Game.Graphics; +using osu.Game.Graphics.UserInterface; +using OpenTK; + +namespace osu.Game.Overlays.Options.Sections +{ + public class MaintenanceSection : OptionsSection + { + public override string Header => "Maintenance"; + public override FontAwesome Icon => FontAwesome.fa_wrench; + + public MaintenanceSection() + { + content.Spacing = new Vector2(0, 5); + Children = new Drawable[] + { + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Delete all unranked maps", + }, + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Repair folder permissions", + }, + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Mark all maps as played", + }, + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Run osu! updater", + }, + new OptionLabel + { + Text = "TODO: osu version here", + Anchor = Anchor.TopCentre, + Origin = Anchor.TopCentre, + }, + }; + } + } } \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs b/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs index 6e41933738..dd3ec3265e 100644 --- a/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs @@ -1,55 +1,55 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Game.Configuration; -using osu.Game.Graphics.UserInterface; - -namespace osu.Game.Overlays.Options.Sections.Online -{ - public class InGameChatOptions : OptionsSubsection - { - private OptionTextBox chatIgnoreList; - private OptionTextBox chatHighlightWords; - protected override string Header => "Chat"; - - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) - { - Children = new Drawable[] - { - new OsuCheckbox - { - LabelText = "Filter offensive words", - Bindable = config.GetBindable(OsuConfig.ChatFilter) - }, - new OsuCheckbox - { - LabelText = "Filter foreign characters", - Bindable = config.GetBindable(OsuConfig.ChatRemoveForeign) - }, - new OsuCheckbox - { - LabelText = "Log private messages", - Bindable = config.GetBindable(OsuConfig.LogPrivateMessages) - }, - new OsuCheckbox - { - LabelText = "Block private messages from non-friends", - Bindable = config.GetBindable(OsuConfig.BlockNonFriendPM) - }, - new OptionLabel { Text = "Chat ignore list (space-seperated list)" }, +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Game.Configuration; +using osu.Game.Graphics.UserInterface; + +namespace osu.Game.Overlays.Options.Sections.Online +{ + public class InGameChatOptions : OptionsSubsection + { + private OptionTextBox chatIgnoreList; + private OptionTextBox chatHighlightWords; + protected override string Header => "Chat"; + + [BackgroundDependencyLoader] + private void load(OsuConfigManager config) + { + Children = new Drawable[] + { + new OsuCheckbox + { + LabelText = "Filter offensive words", + Bindable = config.GetBindable(OsuConfig.ChatFilter) + }, + new OsuCheckbox + { + LabelText = "Filter foreign characters", + Bindable = config.GetBindable(OsuConfig.ChatRemoveForeign) + }, + new OsuCheckbox + { + LabelText = "Log private messages", + Bindable = config.GetBindable(OsuConfig.LogPrivateMessages) + }, + new OsuCheckbox + { + LabelText = "Block private messages from non-friends", + Bindable = config.GetBindable(OsuConfig.BlockNonFriendPM) + }, + new OptionLabel { Text = "Chat ignore list (space-seperated list)" }, chatIgnoreList = new OptionTextBox { RelativeSizeAxes = Axes.X, Bindable = config.GetBindable(OsuConfig.IgnoreList) - }, - new OptionLabel { Text = "Chat highlight words (space-seperated list)" }, + }, + new OptionLabel { Text = "Chat highlight words (space-seperated list)" }, chatHighlightWords = new OptionTextBox { RelativeSizeAxes = Axes.X, Bindable = config.GetBindable(OsuConfig.HighlightWords) - }, - }; + }, + }; } - } + } } \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/OnlineSection.cs b/osu.Game/Overlays/Options/Sections/OnlineSection.cs index e204c5a81a..08ddfbea02 100644 --- a/osu.Game/Overlays/Options/Sections/OnlineSection.cs +++ b/osu.Game/Overlays/Options/Sections/OnlineSection.cs @@ -1,26 +1,26 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Graphics; -using osu.Game.Graphics; -using osu.Game.Overlays.Options.Sections.Online; - -namespace osu.Game.Overlays.Options.Sections -{ - public class OnlineSection : OptionsSection - { - public override string Header => "Online"; - public override FontAwesome Icon => FontAwesome.fa_globe; - - public OnlineSection() - { - Children = new Drawable[] - { +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Graphics; +using osu.Game.Graphics; +using osu.Game.Overlays.Options.Sections.Online; + +namespace osu.Game.Overlays.Options.Sections +{ + public class OnlineSection : OptionsSection + { + public override string Header => "Online"; + public override FontAwesome Icon => FontAwesome.fa_globe; + + public OnlineSection() + { + Children = new Drawable[] + { new InGameChatOptions(), - new PrivacyOptions(), - new NotificationsOptions(), - new IntegrationOptions(), - }; - } - } + new PrivacyOptions(), + new NotificationsOptions(), + new IntegrationOptions(), + }; + } + } } \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/SkinSection.cs b/osu.Game/Overlays/Options/Sections/SkinSection.cs index 720b3f35a2..e1d59fa565 100644 --- a/osu.Game/Overlays/Options/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Options/Sections/SkinSection.cs @@ -1,75 +1,75 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Allocation; -using osu.Framework.Configuration; -using osu.Framework.Graphics; -using osu.Game.Configuration; -using osu.Game.Graphics; -using osu.Game.Graphics.UserInterface; -using OpenTK; - -namespace osu.Game.Overlays.Options.Sections -{ - public class SkinSection : OptionsSection - { - public override string Header => "Skin"; - public override FontAwesome Icon => FontAwesome.fa_paint_brush; - - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) - { - content.Spacing = new Vector2(0, 5); - Children = new Drawable[] - { - new OptionLabel { Text = "TODO: Skin preview textures" }, - new OptionLabel { Text = "Current skin: TODO dropdown" }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Preview gameplay", - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Open skin folder", - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Export as .osk", - }, - new OsuCheckbox - { - LabelText = "Ignore all beatmap skins", - Bindable = config.GetBindable(OsuConfig.IgnoreBeatmapSkins) - }, - new OsuCheckbox - { - LabelText = "Use skin's sound samples", - Bindable = config.GetBindable(OsuConfig.SkinSamples) - }, - new OsuCheckbox - { - LabelText = "Use Taiko skin for Taiko mode", - Bindable = config.GetBindable(OsuConfig.UseTaikoSkin) - }, - new OsuCheckbox - { - LabelText = "Always use skin cursor", - Bindable = config.GetBindable(OsuConfig.UseSkinCursor) - }, - new OptionSlider - { - LabelText = "Cursor size", - Bindable = (BindableDouble)config.GetBindable(OsuConfig.CursorSize) - }, - new OsuCheckbox - { - LabelText = "Automatic cursor size", - Bindable = config.GetBindable(OsuConfig.AutomaticCursorSizing) - }, - }; - } - } +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Allocation; +using osu.Framework.Configuration; +using osu.Framework.Graphics; +using osu.Game.Configuration; +using osu.Game.Graphics; +using osu.Game.Graphics.UserInterface; +using OpenTK; + +namespace osu.Game.Overlays.Options.Sections +{ + public class SkinSection : OptionsSection + { + public override string Header => "Skin"; + public override FontAwesome Icon => FontAwesome.fa_paint_brush; + + [BackgroundDependencyLoader] + private void load(OsuConfigManager config) + { + content.Spacing = new Vector2(0, 5); + Children = new Drawable[] + { + new OptionLabel { Text = "TODO: Skin preview textures" }, + new OptionLabel { Text = "Current skin: TODO dropdown" }, + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Preview gameplay", + }, + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Open skin folder", + }, + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Export as .osk", + }, + new OsuCheckbox + { + LabelText = "Ignore all beatmap skins", + Bindable = config.GetBindable(OsuConfig.IgnoreBeatmapSkins) + }, + new OsuCheckbox + { + LabelText = "Use skin's sound samples", + Bindable = config.GetBindable(OsuConfig.SkinSamples) + }, + new OsuCheckbox + { + LabelText = "Use Taiko skin for Taiko mode", + Bindable = config.GetBindable(OsuConfig.UseTaikoSkin) + }, + new OsuCheckbox + { + LabelText = "Always use skin cursor", + Bindable = config.GetBindable(OsuConfig.UseSkinCursor) + }, + new OptionSlider + { + LabelText = "Cursor size", + Bindable = (BindableDouble)config.GetBindable(OsuConfig.CursorSize) + }, + new OsuCheckbox + { + LabelText = "Automatic cursor size", + Bindable = config.GetBindable(OsuConfig.AutomaticCursorSizing) + }, + }; + } + } } \ No newline at end of file diff --git a/osu.Game/Overlays/Pause/PauseProgressBar.cs b/osu.Game/Overlays/Pause/PauseProgressBar.cs index 28824cb7ea..6edba0dc2d 100644 --- a/osu.Game/Overlays/Pause/PauseProgressBar.cs +++ b/osu.Game/Overlays/Pause/PauseProgressBar.cs @@ -1,147 +1,147 @@ -using OpenTK.Graphics; -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.Containers; +using OpenTK.Graphics; +using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps; using osu.Framework.Graphics.Primitives; -namespace osu.Game.Overlays.Pause -{ - public class PauseProgressBar : Container - { - private Color4 fillColour = new Color4(221, 255, 255, 255); - private Color4 glowColour = new Color4(221, 255, 255, 150); - - private Container fill; - private WorkingBeatmap current; - - [BackgroundDependencyLoader] - private void load(OsuGameBase osuGame) - { - current = osuGame.Beatmap.Value; - } - - protected override void Update() - { - base.Update(); - - if (current?.TrackLoaded ?? false) - { - fill.Width = (float)(current.Track.CurrentTime / current.Track.Length); - } - } - - public PauseProgressBar() - { - RelativeSizeAxes = Axes.X; - Height = 60; - - Children = new Drawable[] - { - new PauseProgressGraph - { - RelativeSizeAxes = Axes.X, - Origin = Anchor.BottomCentre, - Anchor = Anchor.BottomCentre, - Height = 35, - Margin = new MarginPadding - { - Bottom = 5 - } - }, - new Container - { - Origin = Anchor.BottomRight, - Anchor = Anchor.BottomRight, - RelativeSizeAxes = Axes.X, - Height = 5, - Children = new Drawable[] - { - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.Black, - Alpha = 0.5f - } - } - }, - fill = new Container - { +namespace osu.Game.Overlays.Pause +{ + public class PauseProgressBar : Container + { + private Color4 fillColour = new Color4(221, 255, 255, 255); + private Color4 glowColour = new Color4(221, 255, 255, 150); + + private Container fill; + private WorkingBeatmap current; + + [BackgroundDependencyLoader] + private void load(OsuGameBase osuGame) + { + current = osuGame.Beatmap.Value; + } + + protected override void Update() + { + base.Update(); + + if (current?.TrackLoaded ?? false) + { + fill.Width = (float)(current.Track.CurrentTime / current.Track.Length); + } + } + + public PauseProgressBar() + { + RelativeSizeAxes = Axes.X; + Height = 60; + + Children = new Drawable[] + { + new PauseProgressGraph + { RelativeSizeAxes = Axes.X, - Origin = Anchor.BottomLeft, - Anchor = Anchor.BottomLeft, - Width = 0, - Height = 60, - Children = new Drawable[] - { - new Container - { - RelativeSizeAxes = Axes.Both, - Origin = Anchor.BottomLeft, - Anchor = Anchor.BottomLeft, - Masking = true, - Children = new Drawable[] - { - new Container - { - Origin = Anchor.BottomLeft, - Anchor = Anchor.BottomLeft, - RelativeSizeAxes = Axes.X, - Height = 5, - Masking = true, - EdgeEffect = new EdgeEffect - { - Type = EdgeEffectType.Glow, - Colour = glowColour, - Radius = 5 - }, - Children = new Drawable[] - { - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = fillColour - } - } - } - } - }, - new Container - { - Origin = Anchor.BottomRight, - Anchor = Anchor.BottomRight, - Width = 2, - Height = 35, - Children = new Drawable[] - { - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White - }, - new Container - { - Origin = Anchor.BottomCentre, - Anchor = Anchor.TopCentre, - Width = 14, - Height = 25, - CornerRadius = 5, - Masking = true, - Children = new Drawable[] - { - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White - } - } - } - } - } - } - } + Origin = Anchor.BottomCentre, + Anchor = Anchor.BottomCentre, + Height = 35, + Margin = new MarginPadding + { + Bottom = 5 + } + }, + new Container + { + Origin = Anchor.BottomRight, + Anchor = Anchor.BottomRight, + RelativeSizeAxes = Axes.X, + Height = 5, + Children = new Drawable[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Black, + Alpha = 0.5f + } + } + }, + fill = new Container + { + RelativeSizeAxes = Axes.X, + Origin = Anchor.BottomLeft, + Anchor = Anchor.BottomLeft, + Width = 0, + Height = 60, + Children = new Drawable[] + { + new Container + { + RelativeSizeAxes = Axes.Both, + Origin = Anchor.BottomLeft, + Anchor = Anchor.BottomLeft, + Masking = true, + Children = new Drawable[] + { + new Container + { + Origin = Anchor.BottomLeft, + Anchor = Anchor.BottomLeft, + RelativeSizeAxes = Axes.X, + Height = 5, + Masking = true, + EdgeEffect = new EdgeEffect + { + Type = EdgeEffectType.Glow, + Colour = glowColour, + Radius = 5 + }, + Children = new Drawable[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = fillColour + } + } + } + } + }, + new Container + { + Origin = Anchor.BottomRight, + Anchor = Anchor.BottomRight, + Width = 2, + Height = 35, + Children = new Drawable[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White + }, + new Container + { + Origin = Anchor.BottomCentre, + Anchor = Anchor.TopCentre, + Width = 14, + Height = 25, + CornerRadius = 5, + Masking = true, + Children = new Drawable[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White + } + } + } + } + } + } + } }; - } - } -} + } + } +} diff --git a/osu.Game/Overlays/Pause/PauseProgressGraph.cs b/osu.Game/Overlays/Pause/PauseProgressGraph.cs index fab9f37923..afe69ae370 100644 --- a/osu.Game/Overlays/Pause/PauseProgressGraph.cs +++ b/osu.Game/Overlays/Pause/PauseProgressGraph.cs @@ -1,9 +1,9 @@ using osu.Framework.Graphics.Containers; -namespace osu.Game.Overlays.Pause -{ - public class PauseProgressGraph : Container +namespace osu.Game.Overlays.Pause +{ + public class PauseProgressGraph : Container { - // TODO: Implement the pause progress graph - } -} + // TODO: Implement the pause progress graph + } +} diff --git a/osu.Game/Overlays/Pause/ResumeButton.cs b/osu.Game/Overlays/Pause/ResumeButton.cs index 216a852993..c6e4e3384d 100644 --- a/osu.Game/Overlays/Pause/ResumeButton.cs +++ b/osu.Game/Overlays/Pause/ResumeButton.cs @@ -1,22 +1,22 @@ -using osu.Framework.Allocation; -using osu.Framework.Audio; -using osu.Game.Graphics; - -namespace osu.Game.Overlays.Pause -{ - public class ResumeButton : PauseButton - { - [BackgroundDependencyLoader] - private void load(AudioManager audio, OsuColour colours) - { - ButtonColour = colours.Green; - SampleHover = audio.Sample.Get(@"Menu/menuclick"); - SampleClick = audio.Sample.Get(@"Menu/menuback"); - } - - public ResumeButton() +using osu.Framework.Allocation; +using osu.Framework.Audio; +using osu.Game.Graphics; + +namespace osu.Game.Overlays.Pause +{ + public class ResumeButton : PauseButton + { + [BackgroundDependencyLoader] + private void load(AudioManager audio, OsuColour colours) { - Text = @"Continue"; - } - } -} + ButtonColour = colours.Green; + SampleHover = audio.Sample.Get(@"Menu/menuclick"); + SampleClick = audio.Sample.Get(@"Menu/menuback"); + } + + public ResumeButton() + { + Text = @"Continue"; + } + } +}