From 431d225a60e9cf243fb91ca5d4630f92f554a7e5 Mon Sep 17 00:00:00 2001 From: John Neijzen Date: Thu, 8 Jun 2017 14:35:10 +0800 Subject: [PATCH 1/6] Keyword Spacing and Brackets Fixing --- osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetails.cs | 2 +- osu.Desktop.VisualTests/Tests/TestCaseGraph.cs | 2 +- osu.Desktop.VisualTests/Tests/TestCaseMenuOverlays.cs | 2 +- osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs | 3 ++- osu.Game.Rulesets.Mania/MathUtils/FastRandom.cs | 1 - osu.Game.Rulesets.Osu/OsuDifficultyCalculator.cs | 2 +- osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs | 1 - osu.Game/Graphics/UserInterface/Bar.cs | 2 +- osu.Game/Graphics/UserInterface/OsuEnumDropdown.cs | 2 +- .../Overlays/Settings/Sections/Graphics/LayoutSettings.cs | 2 +- osu.Game/Screens/Menu/Button.cs | 2 +- osu.Game/Screens/Menu/ButtonSystem.cs | 6 ++---- osu.Game/Screens/Play/HUD/ModDisplay.cs | 1 - osu.Game/Screens/Play/ReplaySettings/ReplayGroup.cs | 2 +- osu.Game/Screens/Play/SongProgress.cs | 2 +- osu.Game/Screens/Ranking/ResultsPage.cs | 4 ++-- osu.Game/Screens/Tournament/Drawings.cs | 1 - 17 files changed, 16 insertions(+), 21 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetails.cs b/osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetails.cs index 58cbad936a..df80ffdf53 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetails.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetails.cs @@ -41,7 +41,7 @@ namespace osu.Desktop.VisualTests.Tests StarDifficulty = 5.3f, Metrics = new BeatmapMetrics { - Ratings = Enumerable.Range(0,10), + Ratings = Enumerable.Range(0, 10), Fails = Enumerable.Range(lastRange, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(lastRange - 3, 100).Select(i => i % 12 - 6), }, diff --git a/osu.Desktop.VisualTests/Tests/TestCaseGraph.cs b/osu.Desktop.VisualTests/Tests/TestCaseGraph.cs index 7ac795f6f9..f653e2b9b4 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseGraph.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseGraph.cs @@ -30,7 +30,7 @@ namespace osu.Desktop.VisualTests.Tests }, }; - AddStep("values from 1-10", () => graph.Values = Enumerable.Range(1,10).Select(i => (float)i)); + AddStep("values from 1-10", () => graph.Values = Enumerable.Range(1, 10).Select(i => (float)i)); AddStep("values from 1-100", () => graph.Values = Enumerable.Range(1, 100).Select(i => (float)i)); AddStep("reversed values from 1-10", () => graph.Values = Enumerable.Range(1, 10).Reverse().Select(i => (float)i)); AddStep("Bottom to top", () => graph.Direction = BarDirection.BottomToTop); diff --git a/osu.Desktop.VisualTests/Tests/TestCaseMenuOverlays.cs b/osu.Desktop.VisualTests/Tests/TestCaseMenuOverlays.cs index 23fe8f16db..4de8b297eb 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseMenuOverlays.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseMenuOverlays.cs @@ -35,7 +35,7 @@ namespace osu.Desktop.VisualTests.Tests }); AddStep(@"Pause", delegate { - if(failOverlay.State == Visibility.Visible) + if (failOverlay.State == Visibility.Visible) { failOverlay.Hide(); } diff --git a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs index f86fa4dab5..45ae82109f 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs @@ -79,7 +79,8 @@ namespace osu.Desktop.VisualTests.Tests { score.Current.Value += 300 + (ulong)(300.0 * (comboCounter.Current > 0 ? comboCounter.Current - 1 : 0) / 25.0); comboCounter.Increment(); - numerator++; denominator++; + numerator++; + denominator++; accuracyCounter.SetFraction(numerator, denominator); }); diff --git a/osu.Game.Rulesets.Mania/MathUtils/FastRandom.cs b/osu.Game.Rulesets.Mania/MathUtils/FastRandom.cs index ff3fd8e4b7..f31873d1c8 100644 --- a/osu.Game.Rulesets.Mania/MathUtils/FastRandom.cs +++ b/osu.Game.Rulesets.Mania/MathUtils/FastRandom.cs @@ -87,6 +87,5 @@ namespace osu.Game.Rulesets.Mania.MathUtils bitIndex++; return ((bitBuffer >>= 1) & 1) == 1; } - } } diff --git a/osu.Game.Rulesets.Osu/OsuDifficultyCalculator.cs b/osu.Game.Rulesets.Osu/OsuDifficultyCalculator.cs index 5669993e67..21beaf4ccd 100644 --- a/osu.Game.Rulesets.Osu/OsuDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Osu/OsuDifficultyCalculator.cs @@ -186,7 +186,7 @@ namespace osu.Game.Rulesets.Osu public enum DifficultyType { Speed = 0, - Aim, + Aim }; } } diff --git a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs index c7bd4a6704..353342c85d 100644 --- a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs +++ b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs @@ -229,7 +229,6 @@ namespace osu.Game.Rulesets.Taiko.UI if (judgedObject.HitObject.Kiai) kiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject.Judgement, isRim)); - } else hitExplosionContainer.Children.FirstOrDefault(e => e.Judgement == judgedObject.Judgement)?.VisualiseSecondHit(); diff --git a/osu.Game/Graphics/UserInterface/Bar.cs b/osu.Game/Graphics/UserInterface/Bar.cs index 76b75f1084..a0f796050b 100644 --- a/osu.Game/Graphics/UserInterface/Bar.cs +++ b/osu.Game/Graphics/UserInterface/Bar.cs @@ -81,7 +81,7 @@ namespace osu.Game.Graphics.UserInterface background = new Box { RelativeSizeAxes = Axes.Both, - Colour = new Color4(0,0,0,0) + Colour = new Color4(0, 0, 0, 0) }, bar = new Box { diff --git a/osu.Game/Graphics/UserInterface/OsuEnumDropdown.cs b/osu.Game/Graphics/UserInterface/OsuEnumDropdown.cs index 5de6507bb3..bf835f0165 100644 --- a/osu.Game/Graphics/UserInterface/OsuEnumDropdown.cs +++ b/osu.Game/Graphics/UserInterface/OsuEnumDropdown.cs @@ -16,7 +16,7 @@ namespace osu.Game.Graphics.UserInterface throw new InvalidOperationException("OsuEnumDropdown only supports enums as the generic type argument"); List> items = new List>(); - foreach(var val in (T[])Enum.GetValues(typeof(T))) + foreach (var val in (T[])Enum.GetValues(typeof(T))) { var field = typeof(T).GetField(Enum.GetName(typeof(T), val)); items.Add( diff --git a/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs b/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs index ea9ccd3492..5f8900449a 100644 --- a/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs @@ -65,7 +65,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics letterboxSettings.ClearTransforms(); letterboxSettings.AutoSizeAxes = isVisible ? Axes.Y : Axes.None; - if(!isVisible) + if (!isVisible) letterboxSettings.ResizeHeightTo(0, transition_duration, EasingTypes.OutQuint); }; letterboxing.TriggerChange(); diff --git a/osu.Game/Screens/Menu/Button.cs b/osu.Game/Screens/Menu/Button.cs index 1451bf2619..5e726b8b3c 100644 --- a/osu.Game/Screens/Menu/Button.cs +++ b/osu.Game/Screens/Menu/Button.cs @@ -282,7 +282,7 @@ namespace osu.Game.Screens.Menu public ButtonState State { - get{ return state; } + get { return state; } set { diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index 52039a8417..73f1c91be3 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -192,10 +192,8 @@ namespace osu.Game.Screens.Menu public MenuState State { - get - { - return state; - } + get { return state; } + set { if (state == value) return; diff --git a/osu.Game/Screens/Play/HUD/ModDisplay.cs b/osu.Game/Screens/Play/HUD/ModDisplay.cs index 4a10438cdb..921accf6ac 100644 --- a/osu.Game/Screens/Play/HUD/ModDisplay.cs +++ b/osu.Game/Screens/Play/HUD/ModDisplay.cs @@ -54,7 +54,6 @@ namespace osu.Game.Screens.Play.HUD { AutoSizeAxes = Axes.Both, Scale = new Vector2(0.6f), - }); } diff --git a/osu.Game/Screens/Play/ReplaySettings/ReplayGroup.cs b/osu.Game/Screens/Play/ReplaySettings/ReplayGroup.cs index 3e4c0dca5c..91850a99d2 100644 --- a/osu.Game/Screens/Play/ReplaySettings/ReplayGroup.cs +++ b/osu.Game/Screens/Play/ReplaySettings/ReplayGroup.cs @@ -79,7 +79,7 @@ namespace osu.Game.Screens.Play.ReplaySettings { Origin = Anchor.Centre, Anchor = Anchor.CentreRight, - Position = new Vector2(-15,0), + Position = new Vector2(-15, 0), Icon = FontAwesome.fa_bars, Scale = new Vector2(0.75f), Action = toggleContentVisibility, diff --git a/osu.Game/Screens/Play/SongProgress.cs b/osu.Game/Screens/Play/SongProgress.cs index 6b3f81628c..e5b18292ab 100644 --- a/osu.Game/Screens/Play/SongProgress.cs +++ b/osu.Game/Screens/Play/SongProgress.cs @@ -146,7 +146,7 @@ namespace osu.Game.Screens.Play double progress = ((audioClock?.CurrentTime ?? Time.Current) - firstHitTime) / (lastHitTime - firstHitTime); - if(progress < 1) + if (progress < 1) { bar.UpdatePosition((float)progress); graph.Progress = (int)(graph.ColumnCount * progress); diff --git a/osu.Game/Screens/Ranking/ResultsPage.cs b/osu.Game/Screens/Ranking/ResultsPage.cs index 02eae3643b..b6c9191541 100644 --- a/osu.Game/Screens/Ranking/ResultsPage.cs +++ b/osu.Game/Screens/Ranking/ResultsPage.cs @@ -64,7 +64,8 @@ namespace osu.Game.Screens.Ranking Origin = Anchor.Centre, Children = new Drawable[] { - new Box{ + new Box + { RelativeSizeAxes = Axes.Both, Alpha = 0, AlwaysPresent = true @@ -87,6 +88,5 @@ namespace osu.Game.Screens.Ranking } }); } - } } diff --git a/osu.Game/Screens/Tournament/Drawings.cs b/osu.Game/Screens/Tournament/Drawings.cs index 05bf3a250f..483841122b 100644 --- a/osu.Game/Screens/Tournament/Drawings.cs +++ b/osu.Game/Screens/Tournament/Drawings.cs @@ -335,7 +335,6 @@ namespace osu.Game.Screens.Tournament { Logger.Error(ex, "Failed to read last drawings results."); } - } else { From 4abad17b92dfd636b5678c0b0e85ae6950736732 Mon Sep 17 00:00:00 2001 From: John Neijzen Date: Thu, 8 Jun 2017 14:48:42 +0800 Subject: [PATCH 2/6] Fix Black Space after } and Symbol Spacing --- osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs | 2 +- osu.Game/Beatmaps/Drawables/DifficultyIcon.cs | 1 - osu.Game/Online/API/OAuthToken.cs | 1 - osu.Game/Overlays/Mods/ModButton.cs | 1 - osu.Game/Overlays/Music/PlaylistItem.cs | 5 +---- osu.Game/Screens/Multiplayer/DrawableRoom.cs | 2 +- osu.Game/Screens/Play/SongProgressGraph.cs | 2 +- osu.Game/Screens/Ranking/Results.cs | 1 - osu.Game/Users/UserStatus.cs | 2 +- 9 files changed, 5 insertions(+), 12 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs b/osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs index b1b9ddbcda..000d59a365 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs @@ -54,7 +54,7 @@ namespace osu.Desktop.VisualTests.Tests Children = new Drawable[] { new SpriteText { Text = "FadeTime" }, - sliderBar =new TestSliderBar + sliderBar = new TestSliderBar { Width = 150, Height = 10, diff --git a/osu.Game/Beatmaps/Drawables/DifficultyIcon.cs b/osu.Game/Beatmaps/Drawables/DifficultyIcon.cs index 9df1f0f284..14298c4172 100644 --- a/osu.Game/Beatmaps/Drawables/DifficultyIcon.cs +++ b/osu.Game/Beatmaps/Drawables/DifficultyIcon.cs @@ -10,7 +10,6 @@ using OpenTK.Graphics; namespace osu.Game.Beatmaps.Drawables { - public class DifficultyIcon : DifficultyColouredContainer { private readonly BeatmapInfo beatmap; diff --git a/osu.Game/Online/API/OAuthToken.cs b/osu.Game/Online/API/OAuthToken.cs index 328888ab8a..1788adbf56 100644 --- a/osu.Game/Online/API/OAuthToken.cs +++ b/osu.Game/Online/API/OAuthToken.cs @@ -59,7 +59,6 @@ namespace osu.Game.Online.API { } - return null; } } diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index dd135e43ef..d7b5247296 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -20,7 +20,6 @@ using osu.Framework.Graphics.Cursor; namespace osu.Game.Overlays.Mods { - /// /// Represents a clickable button which can cycle through one of more mods. /// diff --git a/osu.Game/Overlays/Music/PlaylistItem.cs b/osu.Game/Overlays/Music/PlaylistItem.cs index 789e45adfc..69cb9c3464 100644 --- a/osu.Game/Overlays/Music/PlaylistItem.cs +++ b/osu.Game/Overlays/Music/PlaylistItem.cs @@ -137,6 +137,7 @@ namespace osu.Game.Overlays.Music public bool MatchingFilter { + get { return matching; } set { if (matching == value) return; @@ -145,10 +146,6 @@ namespace osu.Game.Overlays.Music FadeTo(matching ? 1 : 0, 200); } - get - { - return matching; - } } } } diff --git a/osu.Game/Screens/Multiplayer/DrawableRoom.cs b/osu.Game/Screens/Multiplayer/DrawableRoom.cs index 7365963085..030c253516 100644 --- a/osu.Game/Screens/Multiplayer/DrawableRoom.cs +++ b/osu.Game/Screens/Multiplayer/DrawableRoom.cs @@ -68,7 +68,7 @@ namespace osu.Game.Screens.Multiplayer }, avatar = new UpdateableAvatar { - Size = new Vector2(Height - content_padding* 2), + Size = new Vector2(Height - content_padding * 2), Masking = true, CornerRadius = 5f, Margin = new MarginPadding { Left = content_padding * 2, Top = content_padding }, diff --git a/osu.Game/Screens/Play/SongProgressGraph.cs b/osu.Game/Screens/Play/SongProgressGraph.cs index 4e56f60c31..ea7c465e4d 100644 --- a/osu.Game/Screens/Play/SongProgressGraph.cs +++ b/osu.Game/Screens/Play/SongProgressGraph.cs @@ -34,7 +34,7 @@ namespace osu.Game.Screens.Play { IHasEndTime end = h as IHasEndTime; - int startRange = (int)((h.StartTime - firstHit)/ interval); + int startRange = (int)((h.StartTime - firstHit) / interval); int endRange = (int)(((end?.EndTime > 0 ? end.EndTime : h.StartTime) - firstHit) / interval); for (int i = startRange; i <= endRange; i++) values[i]++; diff --git a/osu.Game/Screens/Ranking/Results.cs b/osu.Game/Screens/Ranking/Results.cs index f3dae710b2..094bdb9f2a 100644 --- a/osu.Game/Screens/Ranking/Results.cs +++ b/osu.Game/Screens/Ranking/Results.cs @@ -71,7 +71,6 @@ namespace osu.Game.Screens.Ranking using (BeginDelayedSequence(transition_time * 0.25f, true)) { - circleOuter.ScaleTo(1, transition_time, EasingTypes.OutQuint); circleOuter.FadeTo(1, transition_time, EasingTypes.OutQuint); diff --git a/osu.Game/Users/UserStatus.cs b/osu.Game/Users/UserStatus.cs index 461008db0f..37b796630b 100644 --- a/osu.Game/Users/UserStatus.cs +++ b/osu.Game/Users/UserStatus.cs @@ -48,7 +48,7 @@ namespace osu.Game.Users public override string Message => @"Solo Game"; } - public class UserStatusMultiplayerGame: UserStatusBusy + public class UserStatusMultiplayerGame : UserStatusBusy { public override string Message => @"Multiplaying"; } From d9a9616125a5cc0e0df8895052df36025e5d093e Mon Sep 17 00:00:00 2001 From: John Neijzen Date: Thu, 8 Jun 2017 14:56:03 +0800 Subject: [PATCH 3/6] EOF remove blank spaces --- osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs | 1 - osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs | 1 - osu.Game/Database/BeatmapDifficulty.cs | 1 - osu.Game/Database/BeatmapSetInfo.cs | 1 - .../Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs | 1 - osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs | 1 - osu.Game/Overlays/Settings/Sections/GeneralSection.cs | 1 - osu.Game/Overlays/Settings/Sections/InputSection.cs | 1 - osu.Game/Overlays/Settings/SettingsSubsection.cs | 1 - 9 files changed, 9 deletions(-) diff --git a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs index 7fb01cedc0..4a6b972f4a 100644 --- a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs +++ b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs @@ -166,4 +166,3 @@ namespace osu.Game.Tests.Beatmaps.IO } } } - diff --git a/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs b/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs index 03d09e24e0..c9b3b1b922 100644 --- a/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs +++ b/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs @@ -86,4 +86,3 @@ namespace osu.Game.Tests.Beatmaps.IO } } } - diff --git a/osu.Game/Database/BeatmapDifficulty.cs b/osu.Game/Database/BeatmapDifficulty.cs index cf1305f705..87c651aa88 100644 --- a/osu.Game/Database/BeatmapDifficulty.cs +++ b/osu.Game/Database/BeatmapDifficulty.cs @@ -39,4 +39,3 @@ namespace osu.Game.Database } } } - diff --git a/osu.Game/Database/BeatmapSetInfo.cs b/osu.Game/Database/BeatmapSetInfo.cs index 0875d3c01f..aa5fa21394 100644 --- a/osu.Game/Database/BeatmapSetInfo.cs +++ b/osu.Game/Database/BeatmapSetInfo.cs @@ -36,4 +36,3 @@ namespace osu.Game.Database public string StoryboardFile { get; set; } } } - diff --git a/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs b/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs index 62801b2ef6..08dba011df 100644 --- a/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs @@ -41,4 +41,3 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay } } } - diff --git a/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs b/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs index 3ceb8d2ff4..01e32b5a1b 100644 --- a/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs @@ -33,4 +33,3 @@ namespace osu.Game.Overlays.Settings.Sections.General } } } - diff --git a/osu.Game/Overlays/Settings/Sections/GeneralSection.cs b/osu.Game/Overlays/Settings/Sections/GeneralSection.cs index 5511f827e2..77148986ff 100644 --- a/osu.Game/Overlays/Settings/Sections/GeneralSection.cs +++ b/osu.Game/Overlays/Settings/Sections/GeneralSection.cs @@ -22,4 +22,3 @@ namespace osu.Game.Overlays.Settings.Sections } } } - diff --git a/osu.Game/Overlays/Settings/Sections/InputSection.cs b/osu.Game/Overlays/Settings/Sections/InputSection.cs index cfa3bc78f0..65df3746b3 100644 --- a/osu.Game/Overlays/Settings/Sections/InputSection.cs +++ b/osu.Game/Overlays/Settings/Sections/InputSection.cs @@ -22,4 +22,3 @@ namespace osu.Game.Overlays.Settings.Sections } } } - diff --git a/osu.Game/Overlays/Settings/SettingsSubsection.cs b/osu.Game/Overlays/Settings/SettingsSubsection.cs index 44328ae867..14082aa4db 100644 --- a/osu.Game/Overlays/Settings/SettingsSubsection.cs +++ b/osu.Game/Overlays/Settings/SettingsSubsection.cs @@ -52,4 +52,3 @@ namespace osu.Game.Overlays.Settings } } } - From 2f7d9655fd32fd5216816ae001942b0b1a07bc40 Mon Sep 17 00:00:00 2001 From: John Neijzen Date: Thu, 8 Jun 2017 15:27:35 +0800 Subject: [PATCH 4/6] More Clean up --- osu.Desktop.VisualTests/Tests/TestCaseDrawableRoom.cs | 4 ++-- osu.Game.Rulesets.Mania/UI/Column.cs | 2 +- osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableSwell.cs | 4 ++-- osu.Game/Graphics/UserInterface/TwoLayerButton.cs | 4 ++-- osu.Game/Overlays/NotificationManager.cs | 6 +++--- osu.Game/Overlays/Settings/Sections/GraphicsSection.cs | 1 - osu.Game/Overlays/Settings/Sidebar.cs | 2 +- osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs | 2 +- osu.Game/Screens/Play/SkipButton.cs | 2 +- 9 files changed, 13 insertions(+), 14 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseDrawableRoom.cs b/osu.Desktop.VisualTests/Tests/TestCaseDrawableRoom.cs index de58323abe..0a401700cf 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseDrawableRoom.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseDrawableRoom.cs @@ -36,12 +36,12 @@ namespace osu.Desktop.VisualTests.Tests }); first.Room.Name.Value = @"Great Room Right Here"; - first.Room.Host.Value = new User { Username = @"Naeferith", Id = 9492835, Country = new Country { FlagName = @"FR" }}; + first.Room.Host.Value = new User { Username = @"Naeferith", Id = 9492835, Country = new Country { FlagName = @"FR" } }; first.Room.Status.Value = new RoomStatusOpen(); first.Room.Beatmap.Value = new BeatmapMetadata { Title = @"Seiryu", Artist = @"Critical Crystal" }; second.Room.Name.Value = @"Relax It's The Weekend"; - second.Room.Host.Value = new User { Username = @"peppy", Id = 2, Country = new Country { FlagName = @"AU" }}; + second.Room.Host.Value = new User { Username = @"peppy", Id = 2, Country = new Country { FlagName = @"AU" } }; second.Room.Status.Value = new RoomStatusPlaying(); second.Room.Beatmap.Value = new BeatmapMetadata { Title = @"ZAQ", Artist = @"Serendipity" }; diff --git a/osu.Game.Rulesets.Mania/UI/Column.cs b/osu.Game.Rulesets.Mania/UI/Column.cs index 6dfd5000d4..6aea29ba71 100644 --- a/osu.Game.Rulesets.Mania/UI/Column.cs +++ b/osu.Game.Rulesets.Mania/UI/Column.cs @@ -61,7 +61,7 @@ namespace osu.Game.Rulesets.Mania.UI { Name = "Hit target + hit objects", RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding { Top = ManiaPlayfield.HIT_TARGET_POSITION}, + Padding = new MarginPadding { Top = ManiaPlayfield.HIT_TARGET_POSITION }, Children = new Drawable[] { new Container diff --git a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableSwell.cs b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableSwell.cs index 37efd8aba4..037b9dae89 100644 --- a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableSwell.cs +++ b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableSwell.cs @@ -68,7 +68,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables Size = new Vector2(TaikoHitObject.DEFAULT_CIRCLE_DIAMETER), BlendingMode = BlendingMode.Additive, Masking = true, - Children = new [] + Children = new[] { new Box { @@ -119,7 +119,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables { Anchor = Anchor.Centre, Origin = Anchor.Centre, - Children = new [] + Children = new[] { symbol = new SwellSymbolPiece() } diff --git a/osu.Game/Graphics/UserInterface/TwoLayerButton.cs b/osu.Game/Graphics/UserInterface/TwoLayerButton.cs index ebaef661c4..6a09a4621f 100644 --- a/osu.Game/Graphics/UserInterface/TwoLayerButton.cs +++ b/osu.Game/Graphics/UserInterface/TwoLayerButton.cs @@ -90,7 +90,7 @@ namespace osu.Game.Graphics.UserInterface Offset = new Vector2(2, 0), Radius = 2, }, - Children = new [] { + Children = new[] { IconLayer = new Box { RelativeSizeAxes = Axes.Both, @@ -124,7 +124,7 @@ namespace osu.Game.Graphics.UserInterface Offset = new Vector2(2, 0), Radius = 2, }, - Children = new [] { + Children = new[] { TextLayer = new Box { Origin = Anchor.TopLeft, diff --git a/osu.Game/Overlays/NotificationManager.cs b/osu.Game/Overlays/NotificationManager.cs index 3ddd85cfcf..05644599dd 100644 --- a/osu.Game/Overlays/NotificationManager.cs +++ b/osu.Game/Overlays/NotificationManager.cs @@ -46,19 +46,19 @@ namespace osu.Game.Overlays Direction = FillDirection.Vertical, AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - Children = new [] + Children = new[] { new NotificationSection { Title = @"Notifications", ClearText = @"Clear All", - AcceptTypes = new [] { typeof(SimpleNotification) }, + AcceptTypes = new[] { typeof(SimpleNotification) }, }, new NotificationSection { Title = @"Running Tasks", ClearText = @"Cancel All", - AcceptTypes = new [] { typeof(ProgressNotification) }, + AcceptTypes = new[] { typeof(ProgressNotification) }, }, } } diff --git a/osu.Game/Overlays/Settings/Sections/GraphicsSection.cs b/osu.Game/Overlays/Settings/Sections/GraphicsSection.cs index f188f2476c..04a9a4d70c 100644 --- a/osu.Game/Overlays/Settings/Sections/GraphicsSection.cs +++ b/osu.Game/Overlays/Settings/Sections/GraphicsSection.cs @@ -24,4 +24,3 @@ namespace osu.Game.Overlays.Settings.Sections } } } - diff --git a/osu.Game/Overlays/Settings/Sidebar.cs b/osu.Game/Overlays/Settings/Sidebar.cs index be93fdbac5..0813f1898a 100644 --- a/osu.Game/Overlays/Settings/Sidebar.cs +++ b/osu.Game/Overlays/Settings/Sidebar.cs @@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Settings }, new SidebarScrollContainer { - Children = new [] + Children = new[] { content = new FillFlowContainer { diff --git a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs index 8e610545f5..9f92edaed4 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs @@ -53,7 +53,7 @@ namespace osu.Game.Overlays.Toolbar Radius = 15, Roundness = 15, }, - Children = new [] + Children = new[] { new Box { diff --git a/osu.Game/Screens/Play/SkipButton.cs b/osu.Game/Screens/Play/SkipButton.cs index ee11fc0ca6..06c7044049 100644 --- a/osu.Game/Screens/Play/SkipButton.cs +++ b/osu.Game/Screens/Play/SkipButton.cs @@ -232,7 +232,7 @@ namespace osu.Game.Screens.Play AutoSizeAxes = Axes.Both, Origin = Anchor.Centre, Direction = FillDirection.Horizontal, - Children = new [] + Children = new[] { new TextAwesome { Icon = FontAwesome.fa_chevron_right }, new TextAwesome { Icon = FontAwesome.fa_chevron_right }, From 5f7270ee4b1109178ffd7a4f8bb4959068e5470c Mon Sep 17 00:00:00 2001 From: Tom94 Date: Thu, 8 Jun 2017 09:53:45 +0200 Subject: [PATCH 5/6] Use new invalidation rules --- osu-framework | 2 +- osu.Game.Rulesets.Mania/Timing/ControlPointContainer.cs | 2 +- osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs | 2 +- osu.Game/Screens/Play/SquareGraph.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osu-framework b/osu-framework index 3ad1dd52ae..68111ddd8d 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 3ad1dd52ae511b816fb928f70ef811ec605c5c18 +Subproject commit 68111ddd8dae9d57874e96812e2b83920b9b8155 diff --git a/osu.Game.Rulesets.Mania/Timing/ControlPointContainer.cs b/osu.Game.Rulesets.Mania/Timing/ControlPointContainer.cs index 2619ce150c..26d5146aae 100644 --- a/osu.Game.Rulesets.Mania/Timing/ControlPointContainer.cs +++ b/osu.Game.Rulesets.Mania/Timing/ControlPointContainer.cs @@ -134,7 +134,7 @@ namespace osu.Game.Rulesets.Mania.Timing public override void InvalidateFromChild(Invalidation invalidation) { // We only want to re-compute our size when a child's size or position has changed - if ((invalidation & Invalidation.Geometry) == 0) + if ((invalidation & Invalidation.RequiredParentSizeToFit) == 0) { base.InvalidateFromChild(invalidation); return; diff --git a/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs b/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs index 11a964d179..ec94dced06 100644 --- a/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs @@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Settings.Sections.General set { bounding = value; - Invalidate(Invalidation.Geometry); + Invalidate(Invalidation.MiscGeometry); } } diff --git a/osu.Game/Screens/Play/SquareGraph.cs b/osu.Game/Screens/Play/SquareGraph.cs index 43a8253b53..0b3bcc55a2 100644 --- a/osu.Game/Screens/Play/SquareGraph.cs +++ b/osu.Game/Screens/Play/SquareGraph.cs @@ -69,7 +69,7 @@ namespace osu.Game.Screens.Play public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true) { - if ((invalidation & Invalidation.SizeInParentSpace) > 0) + if ((invalidation & Invalidation.DrawSize) > 0) layout.Invalidate(); return base.Invalidate(invalidation, source, shallPropagate); } From 64682a741cdfdbce8424c855b3336e02a2f97b64 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 8 Jun 2017 14:51:22 +0900 Subject: [PATCH 6/6] Update framework --- osu-framework | 2 +- osu.Game/Overlays/Chat/DrawableChannel.cs | 2 +- osu.Game/Overlays/Mods/ModButton.cs | 4 ++-- osu.Game/Screens/Edit/Editor.cs | 4 ++-- osu.Game/Screens/Multiplayer/Match.cs | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/osu-framework b/osu-framework index 3ad1dd52ae..63a4ff0593 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 3ad1dd52ae511b816fb928f70ef811ec605c5c18 +Subproject commit 63a4ff05939bcb511a9f18d52dba1ceff99a1cd3 diff --git a/osu.Game/Overlays/Chat/DrawableChannel.cs b/osu.Game/Overlays/Chat/DrawableChannel.cs index 0cd6b8dd3a..e8bde11a3c 100644 --- a/osu.Game/Overlays/Chat/DrawableChannel.cs +++ b/osu.Game/Overlays/Chat/DrawableChannel.cs @@ -86,6 +86,6 @@ namespace osu.Game.Overlays.Chat } } - private void scrollToEnd() => Scheduler.AddDelayed(() => scroll.ScrollToEnd(), 50); + private void scrollToEnd() => ScheduleAfterChildren(() => scroll.ScrollToEnd()); } } diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index dd135e43ef..516f65951c 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -80,7 +80,7 @@ namespace osu.Game.Overlays.Mods backgroundIcon.RotateTo(-rotate_angle * direction, mod_switch_duration, mod_switch_easing); backgroundIcon.Icon = modAfter.Icon; - using (iconsContainer.BeginDelayedSequence(mod_switch_duration, true)) + using (BeginDelayedSequence(mod_switch_duration, true)) { foregroundIcon.RotateTo(-rotate_angle * direction); foregroundIcon.RotateTo(0f, mod_switch_duration, mod_switch_easing); @@ -88,7 +88,7 @@ namespace osu.Game.Overlays.Mods backgroundIcon.RotateTo(rotate_angle * direction); backgroundIcon.RotateTo(0f, mod_switch_duration, mod_switch_easing); - iconsContainer.Schedule(() => displayMod(modAfter)); + Schedule(() => displayMod(modAfter)); } } diff --git a/osu.Game/Screens/Edit/Editor.cs b/osu.Game/Screens/Edit/Editor.cs index 850c640770..2582c68296 100644 --- a/osu.Game/Screens/Edit/Editor.cs +++ b/osu.Game/Screens/Edit/Editor.cs @@ -25,13 +25,13 @@ namespace osu.Game.Screens.Edit protected override void OnEntering(Screen last) { base.OnEntering(last); - Background.Schedule(() => Background.FadeColour(Color4.DarkGray, 500)); + Background.FadeColour(Color4.DarkGray, 500); Beatmap?.Track?.Stop(); } protected override bool OnExiting(Screen next) { - Background.Schedule(() => Background.FadeColour(Color4.White, 500)); + Background.FadeColour(Color4.White, 500); Beatmap?.Track?.Start(); return base.OnExiting(next); } diff --git a/osu.Game/Screens/Multiplayer/Match.cs b/osu.Game/Screens/Multiplayer/Match.cs index 7da6ef800e..ec6a66062d 100644 --- a/osu.Game/Screens/Multiplayer/Match.cs +++ b/osu.Game/Screens/Multiplayer/Match.cs @@ -24,12 +24,12 @@ namespace osu.Game.Screens.Multiplayer { base.OnEntering(last); - Background.Schedule(() => Background.FadeColour(Color4.DarkGray, 500)); + Background.FadeColour(Color4.DarkGray, 500); } protected override bool OnExiting(Screen next) { - Background.Schedule(() => Background.FadeColour(Color4.White, 500)); + Background.FadeColour(Color4.White, 500); return base.OnExiting(next); } }