From 1b92519a866750df35e17a3e5c172967497e1d96 Mon Sep 17 00:00:00 2001 From: default0 Date: Sun, 26 Feb 2017 21:31:40 +0100 Subject: [PATCH 01/23] Update usages of AddToggle in Tests --- osu-framework | 2 +- osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs | 2 +- osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs | 3 ++- osu.Desktop.VisualTests/Tests/TestCaseNotificationManager.cs | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/osu-framework b/osu-framework index 7cad7cf48b..5e03872703 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 7cad7cf48b2ae9f16cac503d46bd0ea801e7561f +Subproject commit 5e038727036aec5cb0005a4eab30fd73fa5ceb18 diff --git a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs index f77025cb06..556d4eceea 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs @@ -95,7 +95,7 @@ namespace osu.Desktop.VisualTests.Tests AddButton(@"slider", () => load(HitObjectType.Slider)); AddButton(@"spinner", () => load(HitObjectType.Spinner)); - AddToggle(@"auto", () => { auto = !auto; load(mode); }); + AddToggle(@"auto", (state) => { auto = state; load(mode); }); ButtonsContainer.Add(new SpriteText { Text = "Playback Speed" }); ButtonsContainer.Add(new BasicSliderBar diff --git a/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs b/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs index 1a811a8588..8d9213ee13 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs @@ -5,6 +5,7 @@ using osu.Framework.Screens.Testing; using osu.Framework.Graphics; using osu.Framework.Timing; using osu.Game.Overlays; +using osu.Framework.Graphics.Containers; namespace osu.Desktop.VisualTests.Tests { @@ -30,7 +31,7 @@ namespace osu.Desktop.VisualTests.Tests Anchor = Anchor.Centre }; Add(mc); - AddToggle(@"Show", mc.ToggleVisibility); + AddToggle(@"Show", (state) => mc.State = state ? Visibility.Visible : Visibility.Hidden); } } } diff --git a/osu.Desktop.VisualTests/Tests/TestCaseNotificationManager.cs b/osu.Desktop.VisualTests/Tests/TestCaseNotificationManager.cs index 78174a8f64..adf222d95d 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseNotificationManager.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseNotificationManager.cs @@ -8,6 +8,7 @@ using osu.Framework.MathUtils; using osu.Game.Overlays; using System.Linq; using osu.Game.Overlays.Notifications; +using osu.Framework.Graphics.Containers; namespace osu.Desktop.VisualTests.Tests { @@ -30,7 +31,7 @@ namespace osu.Desktop.VisualTests.Tests Origin = Anchor.TopRight, }); - AddToggle(@"show", manager.ToggleVisibility); + AddToggle(@"show", (state) => manager.State = state ? Visibility.Visible : Visibility.Hidden); AddButton(@"simple #1", sendNotification1); AddButton(@"simple #2", sendNotification2); From 8d91519d597421e98a891639dab13cd649481de7 Mon Sep 17 00:00:00 2001 From: default0 Date: Sun, 26 Feb 2017 21:32:43 +0100 Subject: [PATCH 02/23] Update usage of FlowContainer and its subclasses --- osu.Desktop/Overlays/VersionManager.cs | 7 ++++--- osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs | 3 +-- osu.Game/Beatmaps/Drawables/BeatmapPanel.cs | 7 +++---- osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs | 4 ++-- osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs | 2 +- osu.Game/Graphics/UserInterface/StarCounter.cs | 3 +-- osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs | 2 +- osu.Game/Online/Chat/Drawables/DrawableChannel.cs | 2 +- osu.Game/Overlays/NotificationManager.cs | 2 +- osu.Game/Overlays/Notifications/NotificationSection.cs | 6 +++--- osu.Game/Overlays/Options/OptionDropDown.cs | 2 +- osu.Game/Overlays/Options/OptionSlider.cs | 2 +- osu.Game/Overlays/Options/OptionsSection.cs | 3 +-- osu.Game/Overlays/Options/OptionsSubsection.cs | 5 ++--- osu.Game/Overlays/Options/Sections/EditorSection.cs | 3 ++- .../Overlays/Options/Sections/General/LoginOptions.cs | 3 +-- osu.Game/Overlays/Options/Sections/MaintenanceSection.cs | 3 ++- osu.Game/Overlays/Options/Sections/SkinSection.cs | 3 ++- osu.Game/Overlays/Options/Sidebar.cs | 2 +- osu.Game/Overlays/OptionsOverlay.cs | 4 ++-- osu.Game/Overlays/Pause/PauseOverlay.cs | 6 ++---- osu.Game/Overlays/Toolbar/Toolbar.cs | 4 ++-- osu.Game/Overlays/Toolbar/ToolbarButton.cs | 9 ++++----- osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs | 2 +- osu.Game/Screens/GameScreenWhiteBox.cs | 2 +- osu.Game/Screens/Menu/Button.cs | 2 +- osu.Game/Screens/Menu/ButtonSystem.cs | 5 ++--- osu.Game/Screens/Menu/Disclaimer.cs | 3 +-- osu.Game/Screens/Play/KeyCounterCollection.cs | 2 +- osu.Game/Screens/Play/PlayerLoader.cs | 2 +- osu.Game/Screens/Ranking/Results.cs | 2 +- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 6 +++--- osu.Game/Screens/Select/FilterControl.cs | 8 +++----- osu.Game/Screens/Select/Footer.cs | 6 ++---- 34 files changed, 58 insertions(+), 69 deletions(-) diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Desktop/Overlays/VersionManager.cs index bdc8bc7e1a..245b52fc46 100644 --- a/osu.Desktop/Overlays/VersionManager.cs +++ b/osu.Desktop/Overlays/VersionManager.cs @@ -60,16 +60,15 @@ namespace osu.Desktop.Overlays new FlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), Children = new Drawable[] { new FlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirections.Horizontal, + FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(5)), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, - Spacing = new Vector2(5), Children = new Drawable[] { new OsuSpriteText @@ -95,6 +94,8 @@ namespace osu.Desktop.Overlays }, new Sprite { + Anchor = Anchor.TopCentre, + Origin = Anchor.TopCentre, Texture = textures.Get(@"Menu/dev-build-footer"), }, } diff --git a/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs b/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs index 8f53041017..42868fffac 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs @@ -25,8 +25,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables AutoSizeAxes = Axes.Both; Origin = Anchor.Centre; - Direction = FlowDirections.Vertical; - Spacing = new Vector2(0, 2); + FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 2)); Position = (h?.StackedEndPosition ?? Vector2.Zero) + judgement.PositionOffset; Children = new Drawable[] diff --git a/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs b/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs index 214712af72..def333a2c3 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs @@ -86,7 +86,7 @@ namespace osu.Game.Beatmaps.Drawables new FlowContainer { Padding = new MarginPadding(5), - Direction = FlowDirections.Horizontal, + FlowStrategy = FlowStrategies.GetHorizontalFlow(), AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, @@ -101,15 +101,14 @@ namespace osu.Game.Beatmaps.Drawables new FlowContainer { Padding = new MarginPadding { Left = 5 }, - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), AutoSizeAxes = Axes.Both, Children = new Drawable[] { new FlowContainer { - Direction = FlowDirections.Horizontal, + FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(4, 0)), AutoSizeAxes = Axes.Both, - Spacing = new Vector2(4, 0), Children = new[] { new OsuSpriteText diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index 8681259272..8b3faf59ce 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -38,7 +38,7 @@ namespace osu.Game.Beatmaps.Drawables }, new FlowContainer { - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 }, AutoSizeAxes = Axes.Both, Children = new[] @@ -112,7 +112,7 @@ namespace osu.Game.Beatmaps.Drawables new FlowContainer { Depth = -1, - Direction = FlowDirections.Horizontal, + FlowStrategy = FlowStrategies.GetHorizontalFlow(), RelativeSizeAxes = Axes.Both, // This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle Shear = new Vector2(0.8f, 0), diff --git a/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs b/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs index c2eb1fbc69..a0a9bd7063 100644 --- a/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs +++ b/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs @@ -21,7 +21,7 @@ namespace osu.Game.Graphics.UserInterface { new FlowContainer { - Direction = FlowDirections.Horizontal, + FlowStrategy = FlowStrategies.GetHorizontalFlow(), RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] diff --git a/osu.Game/Graphics/UserInterface/StarCounter.cs b/osu.Game/Graphics/UserInterface/StarCounter.cs index d2ca2e72f7..a6f4186efc 100644 --- a/osu.Game/Graphics/UserInterface/StarCounter.cs +++ b/osu.Game/Graphics/UserInterface/StarCounter.cs @@ -73,8 +73,7 @@ namespace osu.Game.Graphics.UserInterface stars = new FlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirections.Horizontal, - Spacing = new Vector2(star_spacing), + FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(star_spacing)), } }; diff --git a/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs b/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs index 4ae3ae6e50..178a6b0bc8 100644 --- a/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs +++ b/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs @@ -39,7 +39,7 @@ namespace osu.Game.Graphics.UserInterface.Volume Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, Margin = new MarginPadding { Left = 10, Right = 10, Top = 30, Bottom = 30 }, - Spacing = new Vector2(15, 0), + FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(15, 0)), Children = new Drawable[] { volumeMeterMaster = new VolumeMeter("Master"), diff --git a/osu.Game/Online/Chat/Drawables/DrawableChannel.cs b/osu.Game/Online/Chat/Drawables/DrawableChannel.cs index 84d15967e4..19df21ba8c 100644 --- a/osu.Game/Online/Chat/Drawables/DrawableChannel.cs +++ b/osu.Game/Online/Chat/Drawables/DrawableChannel.cs @@ -41,7 +41,7 @@ namespace osu.Game.Online.Chat.Drawables { flow = new FlowContainer { - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Left = 20, Right = 20 } diff --git a/osu.Game/Overlays/NotificationManager.cs b/osu.Game/Overlays/NotificationManager.cs index 7172559a94..4e8c17a0f2 100644 --- a/osu.Game/Overlays/NotificationManager.cs +++ b/osu.Game/Overlays/NotificationManager.cs @@ -46,7 +46,7 @@ namespace osu.Game.Overlays { sections = new FlowContainer { - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, Children = new [] diff --git a/osu.Game/Overlays/Notifications/NotificationSection.cs b/osu.Game/Overlays/Notifications/NotificationSection.cs index e5a597e387..9dfe290fc3 100644 --- a/osu.Game/Overlays/Notifications/NotificationSection.cs +++ b/osu.Game/Overlays/Notifications/NotificationSection.cs @@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Notifications { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - Direction = FlowDirections.Vertical; + FlowStrategy = FlowStrategies.GetVerticalFlow(); Padding = new MarginPadding { @@ -91,7 +91,7 @@ namespace osu.Game.Overlays.Notifications { Bottom = 5 }, - Spacing = new Vector2(5, 0), + FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(5, 0)), AutoSizeAxes = Axes.Both, Children = new Drawable[] { @@ -116,7 +116,7 @@ namespace osu.Game.Overlays.Notifications RelativeSizeAxes = Axes.X, LayoutDuration = 150, LayoutEasing = EasingTypes.OutQuart, - Spacing = new Vector2(3), + FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(3)), } }); } diff --git a/osu.Game/Overlays/Options/OptionDropDown.cs b/osu.Game/Overlays/Options/OptionDropDown.cs index 2f88ab34ae..86556c4ac9 100644 --- a/osu.Game/Overlays/Options/OptionDropDown.cs +++ b/osu.Game/Overlays/Options/OptionDropDown.cs @@ -89,7 +89,7 @@ namespace osu.Game.Overlays.Options { Items = new KeyValuePair[0]; - Direction = FlowDirections.Vertical; + FlowStrategy = FlowStrategies.GetVerticalFlow(); RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Children = new Drawable[] diff --git a/osu.Game/Overlays/Options/OptionSlider.cs b/osu.Game/Overlays/Options/OptionSlider.cs index 0e5d9f915c..482af3edbe 100644 --- a/osu.Game/Overlays/Options/OptionSlider.cs +++ b/osu.Game/Overlays/Options/OptionSlider.cs @@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Options public OptionSlider() { - Direction = FlowDirections.Vertical; + FlowStrategy = FlowStrategies.GetFillFlow(); RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Padding = new MarginPadding { Right = 5 }; diff --git a/osu.Game/Overlays/Options/OptionsSection.cs b/osu.Game/Overlays/Options/OptionsSection.cs index 61cfa868ec..e8d2a8af17 100644 --- a/osu.Game/Overlays/Options/OptionsSection.cs +++ b/osu.Game/Overlays/Options/OptionsSection.cs @@ -61,8 +61,7 @@ namespace osu.Game.Overlays.Options FlowContent = new FlowContainer { Margin = new MarginPadding { Top = header_size + header_margin }, - Direction = FlowDirections.Vertical, - Spacing = new Vector2(0, 30), + FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 30)), AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, }, diff --git a/osu.Game/Overlays/Options/OptionsSubsection.cs b/osu.Game/Overlays/Options/OptionsSubsection.cs index 4d8be559a7..27f98f7211 100644 --- a/osu.Game/Overlays/Options/OptionsSubsection.cs +++ b/osu.Game/Overlays/Options/OptionsSubsection.cs @@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Options { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - Direction = FlowDirections.Vertical; + FlowStrategy = FlowStrategies.GetVerticalFlow(); AddInternal(new Drawable[] { new OsuSpriteText @@ -31,10 +31,9 @@ namespace osu.Game.Overlays.Options }, content = new FlowContainer { - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 5)), RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Spacing = new Vector2(0, 5), }, }); } diff --git a/osu.Game/Overlays/Options/Sections/EditorSection.cs b/osu.Game/Overlays/Options/Sections/EditorSection.cs index 513d89c601..ba615cafd1 100644 --- a/osu.Game/Overlays/Options/Sections/EditorSection.cs +++ b/osu.Game/Overlays/Options/Sections/EditorSection.cs @@ -7,6 +7,7 @@ using osu.Game.Configuration; using osu.Game.Graphics; using osu.Game.Graphics.UserInterface; using OpenTK; +using osu.Framework.Graphics.Containers; namespace osu.Game.Overlays.Options.Sections { @@ -18,7 +19,7 @@ namespace osu.Game.Overlays.Options.Sections [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - FlowContent.Spacing = new Vector2(0, 5); + FlowContent.FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(0, 5)); Children = new Drawable[] { new OsuCheckbox diff --git a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs index 34f42aac43..ab1142c564 100644 --- a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs @@ -100,10 +100,9 @@ namespace osu.Game.Overlays.Options.Sections.General private void load(APIAccess api, OsuConfigManager config) { this.api = api; - Direction = FlowDirections.Vertical; + FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 5)); AutoSizeAxes = Axes.Y; RelativeSizeAxes = Axes.X; - Spacing = new Vector2(0, 5); Children = new Drawable[] { username = new OsuTextBox diff --git a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs index b69e085e6b..0b48527bd0 100644 --- a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs +++ b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs @@ -5,6 +5,7 @@ using osu.Framework.Graphics; using osu.Game.Graphics; using osu.Game.Graphics.UserInterface; using OpenTK; +using osu.Framework.Graphics.Containers; namespace osu.Game.Overlays.Options.Sections { @@ -15,7 +16,7 @@ namespace osu.Game.Overlays.Options.Sections public MaintenanceSection() { - FlowContent.Spacing = new Vector2(0, 5); + FlowContent.FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(0, 5)); Children = new Drawable[] { new OsuButton diff --git a/osu.Game/Overlays/Options/Sections/SkinSection.cs b/osu.Game/Overlays/Options/Sections/SkinSection.cs index 56dd9ca318..9bf977dc4e 100644 --- a/osu.Game/Overlays/Options/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Options/Sections/SkinSection.cs @@ -8,6 +8,7 @@ using osu.Game.Configuration; using osu.Game.Graphics; using osu.Game.Graphics.UserInterface; using OpenTK; +using osu.Framework.Graphics.Containers; namespace osu.Game.Overlays.Options.Sections { @@ -19,7 +20,7 @@ namespace osu.Game.Overlays.Options.Sections [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - FlowContent.Spacing = new Vector2(0, 5); + FlowContent.FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(0, 5)); Children = new Drawable[] { new OptionLabel { Text = "TODO: Skin preview textures" }, diff --git a/osu.Game/Overlays/Options/Sidebar.cs b/osu.Game/Overlays/Options/Sidebar.cs index 362c448807..7c90675295 100644 --- a/osu.Game/Overlays/Options/Sidebar.cs +++ b/osu.Game/Overlays/Options/Sidebar.cs @@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Options Anchor = Anchor.CentreLeft, AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - Direction = FlowDirections.Vertical + FlowStrategy = FlowStrategies.GetVerticalFlow(), } } }, diff --git a/osu.Game/Overlays/OptionsOverlay.cs b/osu.Game/Overlays/OptionsOverlay.cs index 6d47e628ea..79645134e0 100644 --- a/osu.Game/Overlays/OptionsOverlay.cs +++ b/osu.Game/Overlays/OptionsOverlay.cs @@ -77,7 +77,7 @@ namespace osu.Game.Overlays { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), Children = new Drawable[] { @@ -98,7 +98,7 @@ namespace osu.Game.Overlays { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), Children = sections, } } diff --git a/osu.Game/Overlays/Pause/PauseOverlay.cs b/osu.Game/Overlays/Pause/PauseOverlay.cs index 12a193c0be..99732d09d9 100644 --- a/osu.Game/Overlays/Pause/PauseOverlay.cs +++ b/osu.Game/Overlays/Pause/PauseOverlay.cs @@ -104,8 +104,7 @@ namespace osu.Game.Overlays.Pause { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Direction = FlowDirections.Vertical, - Spacing = new Vector2(0f, 50f), + FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 50)), Origin = Anchor.Centre, Anchor = Anchor.Centre, Children = new Drawable[] @@ -113,8 +112,7 @@ namespace osu.Game.Overlays.Pause new FlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirections.Vertical, - Spacing = new Vector2(0f, 20f), + FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 20)), Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, Children = new Drawable[] diff --git a/osu.Game/Overlays/Toolbar/Toolbar.cs b/osu.Game/Overlays/Toolbar/Toolbar.cs index caed663c04..a2ce2d03cf 100644 --- a/osu.Game/Overlays/Toolbar/Toolbar.cs +++ b/osu.Game/Overlays/Toolbar/Toolbar.cs @@ -43,7 +43,7 @@ namespace osu.Game.Overlays.Toolbar new ToolbarBackground(), new FlowContainer { - Direction = FlowDirections.Horizontal, + FlowStrategy = FlowStrategies.GetHorizontalFlow(), RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] @@ -63,7 +63,7 @@ namespace osu.Game.Overlays.Toolbar { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, - Direction = FlowDirections.Horizontal, + FlowStrategy = FlowStrategies.GetHorizontalFlow(), RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] diff --git a/osu.Game/Overlays/Toolbar/ToolbarButton.cs b/osu.Game/Overlays/Toolbar/ToolbarButton.cs index 9c3c1095a3..5431acec17 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarButton.cs @@ -84,19 +84,18 @@ namespace osu.Game.Overlays.Toolbar }, Flow = new FlowContainer { - Direction = FlowDirections.Horizontal, + FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(5)), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Padding = new MarginPadding { Left = Toolbar.HEIGHT / 2, Right = Toolbar.HEIGHT / 2 }, - Spacing = new Vector2(5), RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] { DrawableIcon = new TextAwesome { - Anchor = Anchor.CentreLeft, - Origin = Anchor.CentreLeft, + Anchor = Anchor.Centre, + Origin = Anchor.Centre, }, DrawableText = new OsuSpriteText { @@ -107,7 +106,7 @@ namespace osu.Game.Overlays.Toolbar }, tooltipContainer = new FlowContainer { - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), RelativeSizeAxes = Axes.Both, //stops us being considered in parent's autosize Anchor = (TooltipAnchor & Anchor.x0) > 0 ? Anchor.BottomLeft : Anchor.BottomRight, Origin = TooltipAnchor, diff --git a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs index b3d1d29ae9..3dfb3c0e4e 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs @@ -36,7 +36,7 @@ namespace osu.Game.Overlays.Toolbar { RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, - Direction = FlowDirections.Horizontal, + FlowStrategy = FlowStrategies.GetHorizontalFlow(), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Padding = new MarginPadding { Left = padding, Right = padding }, diff --git a/osu.Game/Screens/GameScreenWhiteBox.cs b/osu.Game/Screens/GameScreenWhiteBox.cs index a172726e67..8d79d1e1b9 100644 --- a/osu.Game/Screens/GameScreenWhiteBox.cs +++ b/osu.Game/Screens/GameScreenWhiteBox.cs @@ -126,7 +126,7 @@ namespace osu.Game.Screens }, childModeButtons = new FlowContainer { - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), Anchor = Anchor.TopRight, Origin = Anchor.TopRight, RelativeSizeAxes = Axes.Both, diff --git a/osu.Game/Screens/Menu/Button.cs b/osu.Game/Screens/Menu/Button.cs index b1e39c8a35..7398eb62e7 100644 --- a/osu.Game/Screens/Menu/Button.cs +++ b/osu.Game/Screens/Menu/Button.cs @@ -114,7 +114,7 @@ namespace osu.Game.Screens.Menu new OsuSpriteText { Shadow = true, - Direction = FlowDirections.Horizontal, + AllowMultiline = false, Anchor = Anchor.Centre, Origin = Anchor.Centre, TextSize = 16, diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index dad7490c69..ebfeaf5506 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -78,16 +78,15 @@ namespace osu.Game.Screens.Menu }, buttonFlow = new FlowContainerWithOrigin { - Direction = FlowDirections.Horizontal, + FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(-WEDGE_WIDTH, 0)), Anchor = Anchor.Centre, AutoSizeAxes = Axes.Both, - Spacing = new Vector2(-WEDGE_WIDTH, 0), Children = new[] { settingsButton = new Button(@"settings", @"options", FontAwesome.fa_gear, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -WEDGE_WIDTH, Key.O), backButton = new Button(@"back", @"back", FontAwesome.fa_osu_left_o, new Color4(51, 58, 94, 255), onBack, -WEDGE_WIDTH), iconFacade = new Container //need a container to make the osu! icon flow properly. - { + { Size = new Vector2(0, BUTTON_AREA_HEIGHT) } }, diff --git a/osu.Game/Screens/Menu/Disclaimer.cs b/osu.Game/Screens/Menu/Disclaimer.cs index 56074dbdfd..7562b4e5f2 100644 --- a/osu.Game/Screens/Menu/Disclaimer.cs +++ b/osu.Game/Screens/Menu/Disclaimer.cs @@ -32,8 +32,7 @@ namespace osu.Game.Screens.Menu AutoSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre, - Direction = FlowDirections.Vertical, - Spacing = new Vector2(0, 2), + FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 2)), Children = new Drawable[] { icon = new TextAwesome diff --git a/osu.Game/Screens/Play/KeyCounterCollection.cs b/osu.Game/Screens/Play/KeyCounterCollection.cs index 8e7f7558d7..fbd9514208 100644 --- a/osu.Game/Screens/Play/KeyCounterCollection.cs +++ b/osu.Game/Screens/Play/KeyCounterCollection.cs @@ -12,7 +12,7 @@ namespace osu.Game.Screens.Play { public KeyCounterCollection() { - Direction = FlowDirections.Horizontal; + FlowStrategy = FlowStrategies.GetHorizontalFlow(); AutoSizeAxes = Axes.Both; } diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index e84425fbee..f8447a3439 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -139,7 +139,7 @@ namespace osu.Game.Screens.Play AutoSizeAxes = Axes.Both, Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), Children = new Drawable[] { new OsuSpriteText diff --git a/osu.Game/Screens/Ranking/Results.cs b/osu.Game/Screens/Ranking/Results.cs index 33c680e539..861cc63947 100644 --- a/osu.Game/Screens/Ranking/Results.cs +++ b/osu.Game/Screens/Ranking/Results.cs @@ -68,7 +68,7 @@ namespace osu.Game.Screens.Ranking new FlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), Children = new Drawable[] { new OsuSpriteText diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 7856d0b031..8d99048b88 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -125,7 +125,7 @@ namespace osu.Game.Screens.Select { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), Margin = new MarginPadding { Top = 10, Left = 25, Right = 10, Bottom = 20 }, AutoSizeAxes = Axes.Both, Children = new Drawable[] @@ -147,7 +147,7 @@ namespace osu.Game.Screens.Select new FlowContainer { Margin = new MarginPadding { Top = 10 }, - Direction = FlowDirections.Horizontal, + FlowStrategy = FlowStrategies.GetHorizontalFlow(), AutoSizeAxes = Axes.Both, Children = new [] { @@ -170,7 +170,7 @@ namespace osu.Game.Screens.Select new FlowContainer { Margin = new MarginPadding { Top = 20 }, - Spacing = new Vector2(40,0), + FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(40, 0)), AutoSizeAxes = Axes.Both, Children = labels }, diff --git a/osu.Game/Screens/Select/FilterControl.cs b/osu.Game/Screens/Select/FilterControl.cs index 23a61459ea..2aee714233 100644 --- a/osu.Game/Screens/Select/FilterControl.cs +++ b/osu.Game/Screens/Select/FilterControl.cs @@ -44,7 +44,7 @@ namespace osu.Game.Screens.Select Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Width = 0.4f, // TODO: InnerWidth property or something - Direction = FlowDirections.Vertical, + FlowStrategy = FlowStrategies.GetVerticalFlow(), Children = new Drawable[] { searchTextBox = new SearchTextBox { @@ -177,8 +177,7 @@ namespace osu.Game.Screens.Select new FlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirections.Horizontal, - Spacing = new Vector2(10, 0), + FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(10, 0)), Children = new Drawable[] { new TabItem @@ -209,8 +208,7 @@ namespace osu.Game.Screens.Select new FlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirections.Horizontal, - Spacing = new Vector2(10, 0), + FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(10, 0)), Origin = Anchor.TopRight, Anchor = Anchor.TopRight, Children = new Drawable[] diff --git a/osu.Game/Screens/Select/Footer.cs b/osu.Game/Screens/Select/Footer.cs index 05ed670673..31cea60cdd 100644 --- a/osu.Game/Screens/Select/Footer.cs +++ b/osu.Game/Screens/Select/Footer.cs @@ -98,15 +98,13 @@ namespace osu.Game.Screens.Select Position = new Vector2(BackButton.SIZE_EXTENDED.X + padding, 0), RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, - Direction = FlowDirections.Horizontal, - Spacing = new Vector2(padding, 0), + FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(padding, 0)), Children = new Drawable[] { buttons = new FlowContainer { - Direction = FlowDirections.Horizontal, - Spacing = new Vector2(0.2f, 0), + FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(0.2f, 0)), AutoSizeAxes = Axes.Both, } } From 0d1dec665a5f86bf9963b07a9dfd11d90298291f Mon Sep 17 00:00:00 2001 From: default0 Date: Sun, 26 Feb 2017 21:34:27 +0100 Subject: [PATCH 03/23] Set StarDifficulty to -1 for invalid beatmaps The StarDifficulty calculation in a BeatmapGroup would not properly deal with Beatmaps that cannot be loaded and thus cause a NullReferenceException when trying to work with them, instead of assigning a StarDifficulty of -1 to signify that the map is invalid. --- osu-framework | 2 +- osu.Game/Beatmaps/Drawables/BeatmapGroup.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu-framework b/osu-framework index 5e03872703..92db4fc015 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 5e038727036aec5cb0005a4eab30fd73fa5ceb18 +Subproject commit 92db4fc015274a4b8a74d9adb2d7a68b8be2134c diff --git a/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs b/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs index 36c042ac30..9c1f1a02fc 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs @@ -64,7 +64,7 @@ namespace osu.Game.Beatmaps.Drawables BeatmapSet = beatmapSet; WorkingBeatmap beatmap = database.GetWorkingBeatmap(BeatmapSet.Beatmaps.FirstOrDefault()); foreach (var b in BeatmapSet.Beatmaps) - b.StarDifficulty = (float)database.GetWorkingBeatmap(b).Beatmap.CalculateStarDifficulty(); + b.StarDifficulty = (float)(database.GetWorkingBeatmap(b).Beatmap?.CalculateStarDifficulty() ?? -1f); Header = new BeatmapSetHeader(beatmap) { From 4a4f1f4d82f872f586e97b09e7f07dd6ed4a7eea Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 18:26:51 +0900 Subject: [PATCH 04/23] Actually delete all related database entries, not just the set. --- osu.Game/Database/BeatmapDatabase.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index ff58031c57..fc2c7558b0 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -57,6 +57,18 @@ namespace osu.Game.Database try { storage.Delete(b.Path); + + GetChildren(b, true); + + foreach (var i in b.Beatmaps) + { + if (i.Metadata != null) connection.Delete(i.Metadata); + if (i.BaseDifficulty != null) connection.Delete(i.BaseDifficulty); + + connection.Delete(i); + } + + if (b.Metadata != null) connection.Delete(b.Metadata); connection.Delete(b); } catch (Exception e) From 3487dfe23672edd67e016e7c5f9273d7be65fa67 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Mon, 27 Feb 2017 17:32:32 +0300 Subject: [PATCH 05/23] Removed unused variables and parameters --- osu.Desktop.VisualTests/Benchmark.cs | 2 +- osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs | 2 +- osu.Game/Database/BeatmapDatabase.cs | 4 +--- osu.Game/Graphics/Cursor/OsuCursorContainer.cs | 2 +- osu.Game/Graphics/UserInterface/StarCounter.cs | 2 -- osu.Game/Overlays/ChatOverlay.cs | 4 +--- osu.Game/Overlays/MusicController.cs | 3 +-- osu.Game/Overlays/NotificationManager.cs | 2 +- osu.Game/Overlays/Notifications/Notification.cs | 2 +- osu.Game/Overlays/Pause/QuitButton.cs | 2 +- osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs | 2 +- osu.Game/Screens/Menu/ButtonSystem.cs | 2 +- 12 files changed, 11 insertions(+), 18 deletions(-) diff --git a/osu.Desktop.VisualTests/Benchmark.cs b/osu.Desktop.VisualTests/Benchmark.cs index 8c8cffaf3f..3847b6f00f 100644 --- a/osu.Desktop.VisualTests/Benchmark.cs +++ b/osu.Desktop.VisualTests/Benchmark.cs @@ -13,7 +13,7 @@ namespace osu.Desktop.VisualTests private double timePerTest = 200; [BackgroundDependencyLoader] - private void load(Framework.Game game) + private void load() { Host.MaximumDrawHz = int.MaxValue; Host.MaximumUpdateHz = int.MaxValue; diff --git a/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs b/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs index 39f45273a9..5af2e7c197 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs @@ -16,7 +16,7 @@ namespace osu.Game.Beatmaps.Drawables } [BackgroundDependencyLoader] - private void load(OsuGameBase game) + private void load() { if (working.Background != null) Texture = working.Background; diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index ff58031c57..310575de9e 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -25,14 +25,12 @@ namespace osu.Game.Database public event Action BeatmapSetAdded; public event Action BeatmapSetRemoved; - private BeatmapImporter ipc; - public BeatmapDatabase(Storage storage, GameHost importHost = null) { this.storage = storage; if (importHost != null) - ipc = new BeatmapImporter(importHost, this); + new BeatmapImporter(importHost, this); if (connection == null) { diff --git a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs index 8011359db9..73626e03db 100644 --- a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs @@ -52,7 +52,7 @@ namespace osu.Game.Graphics.Cursor } [BackgroundDependencyLoader] - private void load(TextureStore textures, OsuConfigManager config) + private void load(OsuConfigManager config) { cursorScale = (BindableDouble)config.GetBindable(OsuConfig.CursorSize); diff --git a/osu.Game/Graphics/UserInterface/StarCounter.cs b/osu.Game/Graphics/UserInterface/StarCounter.cs index d2ca2e72f7..b9d1dca65d 100644 --- a/osu.Game/Graphics/UserInterface/StarCounter.cs +++ b/osu.Game/Graphics/UserInterface/StarCounter.cs @@ -14,8 +14,6 @@ namespace osu.Game.Graphics.UserInterface { private readonly Container stars; - private double transformStartTime; - /// /// Maximum amount of stars displayed. /// diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index c3138cb571..ab5a255897 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -29,8 +29,6 @@ namespace osu.Game.Overlays { const float textbox_height = 40; - private DrawableChannel channelDisplay; - private ScheduledDelegate messageRequest; private Container content; @@ -126,7 +124,7 @@ namespace osu.Game.Overlays private void addChannel(Channel channel) { - Add(channelDisplay = new DrawableChannel(channel)); + Add(new DrawableChannel(channel)); careChannels.Add(channel); } diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 661cbe06a4..430654b8f5 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -75,8 +75,7 @@ namespace osu.Game.Overlays } [BackgroundDependencyLoader] - private void load(OsuGameBase osuGame, OsuConfigManager config, BeatmapDatabase beatmaps, AudioManager audio, - TextureStore textures, OsuColour colours) + private void load(OsuGameBase osuGame, OsuConfigManager config, BeatmapDatabase beatmaps, OsuColour colours) { game = osuGame; diff --git a/osu.Game/Overlays/NotificationManager.cs b/osu.Game/Overlays/NotificationManager.cs index 7172559a94..77198a7fbe 100644 --- a/osu.Game/Overlays/NotificationManager.cs +++ b/osu.Game/Overlays/NotificationManager.cs @@ -25,7 +25,7 @@ namespace osu.Game.Overlays private FlowContainer sections; [BackgroundDependencyLoader(permitNulls: true)] - private void load(OsuColour colours) + private void load() { Width = width; RelativeSizeAxes = Axes.Y; diff --git a/osu.Game/Overlays/Notifications/Notification.cs b/osu.Game/Overlays/Notifications/Notification.cs index e3a1e55868..179e9bf066 100644 --- a/osu.Game/Overlays/Notifications/Notification.cs +++ b/osu.Game/Overlays/Notifications/Notification.cs @@ -256,7 +256,7 @@ namespace osu.Game.Overlays.Notifications } [BackgroundDependencyLoader] - private void load(OsuColour colours) + private void load() { Size = new Vector2(6, 15); diff --git a/osu.Game/Overlays/Pause/QuitButton.cs b/osu.Game/Overlays/Pause/QuitButton.cs index f1a9fd5e1d..dc99669111 100644 --- a/osu.Game/Overlays/Pause/QuitButton.cs +++ b/osu.Game/Overlays/Pause/QuitButton.cs @@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Pause public class QuitButton : PauseButton { [BackgroundDependencyLoader] - private void load(AudioManager audio, OsuColour colours) + private void load(AudioManager audio) { ButtonColour = new Color4(170, 27, 39, 255); // The red from the design isn't in the palette so it's used directly SampleHover = audio.Sample.Get(@"Menu/menuclick"); diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs index 005efb77a2..f411f74361 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs @@ -9,7 +9,7 @@ namespace osu.Game.Screens.Backgrounds public class BackgroundScreenDefault : BackgroundScreen { [BackgroundDependencyLoader] - private void load(Framework.Game game) + private void load() { Add(new Background(@"Backgrounds/bg1")); } diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index dad7490c69..c4d1abd931 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -117,7 +117,7 @@ namespace osu.Game.Screens.Menu } [BackgroundDependencyLoader(true)] - private void load(AudioManager audio, OsuGame game = null) + private void load(OsuGame game = null) { toolbar = game?.Toolbar; } From 9444ffd8497ac03b866c18d921a456737683cb15 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Mon, 27 Feb 2017 17:37:38 +0300 Subject: [PATCH 06/23] Removed redundant qualifiers --- osu.Desktop/Overlays/VersionManager.cs | 2 +- osu.Game/OsuGame.cs | 2 +- osu.Game/Overlays/Options/OptionDropDown.cs | 2 +- osu.Game/Overlays/Options/OptionTextBox.cs | 2 +- osu.Game/Overlays/Options/Sections/GameplaySection.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Desktop/Overlays/VersionManager.cs index bdc8bc7e1a..af4a0de73c 100644 --- a/osu.Desktop/Overlays/VersionManager.cs +++ b/osu.Desktop/Overlays/VersionManager.cs @@ -37,7 +37,7 @@ namespace osu.Desktop.Overlays [BackgroundDependencyLoader] private void load(NotificationManager notification, OsuColour colours, TextureStore textures) { - this.notificationManager = notification; + notificationManager = notification; AutoSizeAxes = Axes.Both; Anchor = Anchor.BottomCentre; diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index b8a8fe0618..0fdbd31dc8 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -214,7 +214,7 @@ namespace osu.Game } } - return base.OnKeyDown(state, args); + return OnKeyDown(state, args); } public event Action ModeChanged; diff --git a/osu.Game/Overlays/Options/OptionDropDown.cs b/osu.Game/Overlays/Options/OptionDropDown.cs index 2f88ab34ae..72a5160ba0 100644 --- a/osu.Game/Overlays/Options/OptionDropDown.cs +++ b/osu.Game/Overlays/Options/OptionDropDown.cs @@ -101,7 +101,7 @@ namespace osu.Game.Overlays.Options { Margin = new MarginPadding { Top = 5 }, RelativeSizeAxes = Axes.X, - Items = this.Items, + Items = Items, } }; dropdown.ValueChanged += dropdown_ValueChanged; diff --git a/osu.Game/Overlays/Options/OptionTextBox.cs b/osu.Game/Overlays/Options/OptionTextBox.cs index 813d372db6..47c81e6a7e 100644 --- a/osu.Game/Overlays/Options/OptionTextBox.cs +++ b/osu.Game/Overlays/Options/OptionTextBox.cs @@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Options bindable = value; if (bindable != null) { - base.Text = bindable.Value; + Text = bindable.Value; bindable.ValueChanged += bindableValueChanged; } diff --git a/osu.Game/Overlays/Options/Sections/GameplaySection.cs b/osu.Game/Overlays/Options/Sections/GameplaySection.cs index 87de1fd249..85a180ccbc 100644 --- a/osu.Game/Overlays/Options/Sections/GameplaySection.cs +++ b/osu.Game/Overlays/Options/Sections/GameplaySection.cs @@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Options.Sections public GameplaySection() { - base.Children = new Drawable[] + Children = new Drawable[] { new GeneralOptions(), new SongSelectOptions(), From e06b3ecf2db9aea99ad7b47e4a7111ecfe80fdc0 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Mon, 27 Feb 2017 18:18:12 +0300 Subject: [PATCH 07/23] Input fix --- osu.Game/OsuGame.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 0fdbd31dc8..bfb506fd4f 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -214,7 +214,7 @@ namespace osu.Game } } - return OnKeyDown(state, args); + return false; } public event Action ModeChanged; From 03889e6ca60ba47738768b1f3ca013e9d0a43353 Mon Sep 17 00:00:00 2001 From: default0 Date: Mon, 27 Feb 2017 16:55:55 +0100 Subject: [PATCH 08/23] Update References to FlowStrategies References now use the Create*-names instead of the outdated Get*-names to create instances of FlowStrategies. --- osu-framework | 2 +- osu.Desktop/Overlays/VersionManager.cs | 4 ++-- osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs | 2 +- osu.Game/Beatmaps/Drawables/BeatmapPanel.cs | 6 +++--- osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs | 4 ++-- osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs | 2 +- osu.Game/Graphics/UserInterface/StarCounter.cs | 2 +- osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs | 2 +- osu.Game/Online/Chat/Drawables/DrawableChannel.cs | 2 +- osu.Game/Overlays/NotificationManager.cs | 2 +- osu.Game/Overlays/Notifications/NotificationSection.cs | 6 +++--- osu.Game/Overlays/Options/OptionDropDown.cs | 2 +- osu.Game/Overlays/Options/OptionSlider.cs | 2 +- osu.Game/Overlays/Options/OptionsSection.cs | 2 +- osu.Game/Overlays/Options/OptionsSubsection.cs | 4 ++-- osu.Game/Overlays/Options/Sections/EditorSection.cs | 2 +- osu.Game/Overlays/Options/Sections/General/LoginOptions.cs | 2 +- osu.Game/Overlays/Options/Sections/MaintenanceSection.cs | 2 +- osu.Game/Overlays/Options/Sections/SkinSection.cs | 2 +- osu.Game/Overlays/Options/Sidebar.cs | 2 +- osu.Game/Overlays/OptionsOverlay.cs | 4 ++-- osu.Game/Overlays/Pause/PauseOverlay.cs | 4 ++-- osu.Game/Overlays/Toolbar/Toolbar.cs | 4 ++-- osu.Game/Overlays/Toolbar/ToolbarButton.cs | 4 ++-- osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs | 2 +- osu.Game/Screens/GameScreenWhiteBox.cs | 2 +- osu.Game/Screens/Menu/ButtonSystem.cs | 2 +- osu.Game/Screens/Menu/Disclaimer.cs | 2 +- osu.Game/Screens/Play/KeyCounterCollection.cs | 2 +- osu.Game/Screens/Play/PlayerLoader.cs | 2 +- osu.Game/Screens/Ranking/Results.cs | 2 +- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 6 +++--- osu.Game/Screens/Select/FilterControl.cs | 6 +++--- osu.Game/Screens/Select/Footer.cs | 4 ++-- 34 files changed, 50 insertions(+), 50 deletions(-) diff --git a/osu-framework b/osu-framework index 92db4fc015..bd8bc234fc 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 92db4fc015274a4b8a74d9adb2d7a68b8be2134c +Subproject commit bd8bc234fc6014cb18679e5e52da1074f4a4e5be diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Desktop/Overlays/VersionManager.cs index 245b52fc46..23211c5116 100644 --- a/osu.Desktop/Overlays/VersionManager.cs +++ b/osu.Desktop/Overlays/VersionManager.cs @@ -60,13 +60,13 @@ namespace osu.Desktop.Overlays new FlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), Children = new Drawable[] { new FlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(5)), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(5)), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Children = new Drawable[] diff --git a/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs b/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs index 42868fffac..545f71567a 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs @@ -25,7 +25,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables AutoSizeAxes = Axes.Both; Origin = Anchor.Centre; - FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 2)); + FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 2)); Position = (h?.StackedEndPosition ?? Vector2.Zero) + judgement.PositionOffset; Children = new Drawable[] diff --git a/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs b/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs index def333a2c3..7e8b0068c1 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs @@ -86,7 +86,7 @@ namespace osu.Game.Beatmaps.Drawables new FlowContainer { Padding = new MarginPadding(5), - FlowStrategy = FlowStrategies.GetHorizontalFlow(), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(), AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, @@ -101,13 +101,13 @@ namespace osu.Game.Beatmaps.Drawables new FlowContainer { Padding = new MarginPadding { Left = 5 }, - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), AutoSizeAxes = Axes.Both, Children = new Drawable[] { new FlowContainer { - FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(4, 0)), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(4, 0)), AutoSizeAxes = Axes.Both, Children = new[] { diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index 8b3faf59ce..0998423d47 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -38,7 +38,7 @@ namespace osu.Game.Beatmaps.Drawables }, new FlowContainer { - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 }, AutoSizeAxes = Axes.Both, Children = new[] @@ -112,7 +112,7 @@ namespace osu.Game.Beatmaps.Drawables new FlowContainer { Depth = -1, - FlowStrategy = FlowStrategies.GetHorizontalFlow(), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(), RelativeSizeAxes = Axes.Both, // This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle Shear = new Vector2(0.8f, 0), diff --git a/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs b/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs index a0a9bd7063..f1f055fb6a 100644 --- a/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs +++ b/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs @@ -21,7 +21,7 @@ namespace osu.Game.Graphics.UserInterface { new FlowContainer { - FlowStrategy = FlowStrategies.GetHorizontalFlow(), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(), RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] diff --git a/osu.Game/Graphics/UserInterface/StarCounter.cs b/osu.Game/Graphics/UserInterface/StarCounter.cs index a6f4186efc..02e778d42b 100644 --- a/osu.Game/Graphics/UserInterface/StarCounter.cs +++ b/osu.Game/Graphics/UserInterface/StarCounter.cs @@ -73,7 +73,7 @@ namespace osu.Game.Graphics.UserInterface stars = new FlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(star_spacing)), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(star_spacing)), } }; diff --git a/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs b/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs index 178a6b0bc8..6bd4f6542b 100644 --- a/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs +++ b/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs @@ -39,7 +39,7 @@ namespace osu.Game.Graphics.UserInterface.Volume Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, Margin = new MarginPadding { Left = 10, Right = 10, Top = 30, Bottom = 30 }, - FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(15, 0)), + FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(15, 0)), Children = new Drawable[] { volumeMeterMaster = new VolumeMeter("Master"), diff --git a/osu.Game/Online/Chat/Drawables/DrawableChannel.cs b/osu.Game/Online/Chat/Drawables/DrawableChannel.cs index 19df21ba8c..d665e39b24 100644 --- a/osu.Game/Online/Chat/Drawables/DrawableChannel.cs +++ b/osu.Game/Online/Chat/Drawables/DrawableChannel.cs @@ -41,7 +41,7 @@ namespace osu.Game.Online.Chat.Drawables { flow = new FlowContainer { - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Left = 20, Right = 20 } diff --git a/osu.Game/Overlays/NotificationManager.cs b/osu.Game/Overlays/NotificationManager.cs index 4e8c17a0f2..fd57abcb24 100644 --- a/osu.Game/Overlays/NotificationManager.cs +++ b/osu.Game/Overlays/NotificationManager.cs @@ -46,7 +46,7 @@ namespace osu.Game.Overlays { sections = new FlowContainer { - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, Children = new [] diff --git a/osu.Game/Overlays/Notifications/NotificationSection.cs b/osu.Game/Overlays/Notifications/NotificationSection.cs index 9dfe290fc3..90b142d5ae 100644 --- a/osu.Game/Overlays/Notifications/NotificationSection.cs +++ b/osu.Game/Overlays/Notifications/NotificationSection.cs @@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Notifications { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - FlowStrategy = FlowStrategies.GetVerticalFlow(); + FlowStrategy = FlowStrategies.CreateVerticalFlow(); Padding = new MarginPadding { @@ -91,7 +91,7 @@ namespace osu.Game.Overlays.Notifications { Bottom = 5 }, - FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(5, 0)), + FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(5, 0)), AutoSizeAxes = Axes.Both, Children = new Drawable[] { @@ -116,7 +116,7 @@ namespace osu.Game.Overlays.Notifications RelativeSizeAxes = Axes.X, LayoutDuration = 150, LayoutEasing = EasingTypes.OutQuart, - FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(3)), + FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(3)), } }); } diff --git a/osu.Game/Overlays/Options/OptionDropDown.cs b/osu.Game/Overlays/Options/OptionDropDown.cs index 86556c4ac9..865c51a3b3 100644 --- a/osu.Game/Overlays/Options/OptionDropDown.cs +++ b/osu.Game/Overlays/Options/OptionDropDown.cs @@ -89,7 +89,7 @@ namespace osu.Game.Overlays.Options { Items = new KeyValuePair[0]; - FlowStrategy = FlowStrategies.GetVerticalFlow(); + FlowStrategy = FlowStrategies.CreateVerticalFlow(); RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Children = new Drawable[] diff --git a/osu.Game/Overlays/Options/OptionSlider.cs b/osu.Game/Overlays/Options/OptionSlider.cs index 482af3edbe..58635b4345 100644 --- a/osu.Game/Overlays/Options/OptionSlider.cs +++ b/osu.Game/Overlays/Options/OptionSlider.cs @@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Options public OptionSlider() { - FlowStrategy = FlowStrategies.GetFillFlow(); + FlowStrategy = FlowStrategies.CreateFillFlow(); RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Padding = new MarginPadding { Right = 5 }; diff --git a/osu.Game/Overlays/Options/OptionsSection.cs b/osu.Game/Overlays/Options/OptionsSection.cs index e8d2a8af17..7f01ff91d8 100644 --- a/osu.Game/Overlays/Options/OptionsSection.cs +++ b/osu.Game/Overlays/Options/OptionsSection.cs @@ -61,7 +61,7 @@ namespace osu.Game.Overlays.Options FlowContent = new FlowContainer { Margin = new MarginPadding { Top = header_size + header_margin }, - FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 30)), + FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 30)), AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, }, diff --git a/osu.Game/Overlays/Options/OptionsSubsection.cs b/osu.Game/Overlays/Options/OptionsSubsection.cs index 27f98f7211..7fbb2ac3b1 100644 --- a/osu.Game/Overlays/Options/OptionsSubsection.cs +++ b/osu.Game/Overlays/Options/OptionsSubsection.cs @@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Options { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - FlowStrategy = FlowStrategies.GetVerticalFlow(); + FlowStrategy = FlowStrategies.CreateVerticalFlow(); AddInternal(new Drawable[] { new OsuSpriteText @@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Options }, content = new FlowContainer { - FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 5)), + FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 5)), RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, }, diff --git a/osu.Game/Overlays/Options/Sections/EditorSection.cs b/osu.Game/Overlays/Options/Sections/EditorSection.cs index ba615cafd1..0484806044 100644 --- a/osu.Game/Overlays/Options/Sections/EditorSection.cs +++ b/osu.Game/Overlays/Options/Sections/EditorSection.cs @@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Options.Sections [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - FlowContent.FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(0, 5)); + FlowContent.FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(0, 5)); Children = new Drawable[] { new OsuCheckbox diff --git a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs index ab1142c564..15d0a480b5 100644 --- a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs @@ -100,7 +100,7 @@ namespace osu.Game.Overlays.Options.Sections.General private void load(APIAccess api, OsuConfigManager config) { this.api = api; - FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 5)); + FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 5)); AutoSizeAxes = Axes.Y; RelativeSizeAxes = Axes.X; Children = new Drawable[] diff --git a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs index 0b48527bd0..13c479b1ee 100644 --- a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs +++ b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs @@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Options.Sections public MaintenanceSection() { - FlowContent.FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(0, 5)); + FlowContent.FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(0, 5)); Children = new Drawable[] { new OsuButton diff --git a/osu.Game/Overlays/Options/Sections/SkinSection.cs b/osu.Game/Overlays/Options/Sections/SkinSection.cs index 9bf977dc4e..5e262d4109 100644 --- a/osu.Game/Overlays/Options/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Options/Sections/SkinSection.cs @@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Options.Sections [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - FlowContent.FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(0, 5)); + FlowContent.FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(0, 5)); Children = new Drawable[] { new OptionLabel { Text = "TODO: Skin preview textures" }, diff --git a/osu.Game/Overlays/Options/Sidebar.cs b/osu.Game/Overlays/Options/Sidebar.cs index 7c90675295..47b3cfa0ca 100644 --- a/osu.Game/Overlays/Options/Sidebar.cs +++ b/osu.Game/Overlays/Options/Sidebar.cs @@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Options Anchor = Anchor.CentreLeft, AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), } } }, diff --git a/osu.Game/Overlays/OptionsOverlay.cs b/osu.Game/Overlays/OptionsOverlay.cs index 79645134e0..8aabc98771 100644 --- a/osu.Game/Overlays/OptionsOverlay.cs +++ b/osu.Game/Overlays/OptionsOverlay.cs @@ -77,7 +77,7 @@ namespace osu.Game.Overlays { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), Children = new Drawable[] { @@ -98,7 +98,7 @@ namespace osu.Game.Overlays { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), Children = sections, } } diff --git a/osu.Game/Overlays/Pause/PauseOverlay.cs b/osu.Game/Overlays/Pause/PauseOverlay.cs index 99732d09d9..198fe2ffef 100644 --- a/osu.Game/Overlays/Pause/PauseOverlay.cs +++ b/osu.Game/Overlays/Pause/PauseOverlay.cs @@ -104,7 +104,7 @@ namespace osu.Game.Overlays.Pause { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 50)), + FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 50)), Origin = Anchor.Centre, Anchor = Anchor.Centre, Children = new Drawable[] @@ -112,7 +112,7 @@ namespace osu.Game.Overlays.Pause new FlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 20)), + FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 20)), Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, Children = new Drawable[] diff --git a/osu.Game/Overlays/Toolbar/Toolbar.cs b/osu.Game/Overlays/Toolbar/Toolbar.cs index a2ce2d03cf..f9dbb6132a 100644 --- a/osu.Game/Overlays/Toolbar/Toolbar.cs +++ b/osu.Game/Overlays/Toolbar/Toolbar.cs @@ -43,7 +43,7 @@ namespace osu.Game.Overlays.Toolbar new ToolbarBackground(), new FlowContainer { - FlowStrategy = FlowStrategies.GetHorizontalFlow(), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(), RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] @@ -63,7 +63,7 @@ namespace osu.Game.Overlays.Toolbar { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, - FlowStrategy = FlowStrategies.GetHorizontalFlow(), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(), RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] diff --git a/osu.Game/Overlays/Toolbar/ToolbarButton.cs b/osu.Game/Overlays/Toolbar/ToolbarButton.cs index 5431acec17..245311b739 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarButton.cs @@ -84,7 +84,7 @@ namespace osu.Game.Overlays.Toolbar }, Flow = new FlowContainer { - FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(5)), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(5)), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Padding = new MarginPadding { Left = Toolbar.HEIGHT / 2, Right = Toolbar.HEIGHT / 2 }, @@ -106,7 +106,7 @@ namespace osu.Game.Overlays.Toolbar }, tooltipContainer = new FlowContainer { - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), RelativeSizeAxes = Axes.Both, //stops us being considered in parent's autosize Anchor = (TooltipAnchor & Anchor.x0) > 0 ? Anchor.BottomLeft : Anchor.BottomRight, Origin = TooltipAnchor, diff --git a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs index 3dfb3c0e4e..d499238cf7 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs @@ -36,7 +36,7 @@ namespace osu.Game.Overlays.Toolbar { RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, - FlowStrategy = FlowStrategies.GetHorizontalFlow(), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Padding = new MarginPadding { Left = padding, Right = padding }, diff --git a/osu.Game/Screens/GameScreenWhiteBox.cs b/osu.Game/Screens/GameScreenWhiteBox.cs index 8d79d1e1b9..a4adfd5201 100644 --- a/osu.Game/Screens/GameScreenWhiteBox.cs +++ b/osu.Game/Screens/GameScreenWhiteBox.cs @@ -126,7 +126,7 @@ namespace osu.Game.Screens }, childModeButtons = new FlowContainer { - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), Anchor = Anchor.TopRight, Origin = Anchor.TopRight, RelativeSizeAxes = Axes.Both, diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index ebfeaf5506..8ed5a872e2 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -78,7 +78,7 @@ namespace osu.Game.Screens.Menu }, buttonFlow = new FlowContainerWithOrigin { - FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(-WEDGE_WIDTH, 0)), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(-WEDGE_WIDTH, 0)), Anchor = Anchor.Centre, AutoSizeAxes = Axes.Both, Children = new[] diff --git a/osu.Game/Screens/Menu/Disclaimer.cs b/osu.Game/Screens/Menu/Disclaimer.cs index 7562b4e5f2..3f345ddfb2 100644 --- a/osu.Game/Screens/Menu/Disclaimer.cs +++ b/osu.Game/Screens/Menu/Disclaimer.cs @@ -32,7 +32,7 @@ namespace osu.Game.Screens.Menu AutoSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre, - FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 2)), + FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 2)), Children = new Drawable[] { icon = new TextAwesome diff --git a/osu.Game/Screens/Play/KeyCounterCollection.cs b/osu.Game/Screens/Play/KeyCounterCollection.cs index fbd9514208..8772d7d7e4 100644 --- a/osu.Game/Screens/Play/KeyCounterCollection.cs +++ b/osu.Game/Screens/Play/KeyCounterCollection.cs @@ -12,7 +12,7 @@ namespace osu.Game.Screens.Play { public KeyCounterCollection() { - FlowStrategy = FlowStrategies.GetHorizontalFlow(); + FlowStrategy = FlowStrategies.CreateHorizontalFlow(); AutoSizeAxes = Axes.Both; } diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index f8447a3439..52cd41e542 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -139,7 +139,7 @@ namespace osu.Game.Screens.Play AutoSizeAxes = Axes.Both, Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), Children = new Drawable[] { new OsuSpriteText diff --git a/osu.Game/Screens/Ranking/Results.cs b/osu.Game/Screens/Ranking/Results.cs index 861cc63947..4958cbc8e2 100644 --- a/osu.Game/Screens/Ranking/Results.cs +++ b/osu.Game/Screens/Ranking/Results.cs @@ -68,7 +68,7 @@ namespace osu.Game.Screens.Ranking new FlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), Children = new Drawable[] { new OsuSpriteText diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 8d99048b88..0d77e13118 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -125,7 +125,7 @@ namespace osu.Game.Screens.Select { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), Margin = new MarginPadding { Top = 10, Left = 25, Right = 10, Bottom = 20 }, AutoSizeAxes = Axes.Both, Children = new Drawable[] @@ -147,7 +147,7 @@ namespace osu.Game.Screens.Select new FlowContainer { Margin = new MarginPadding { Top = 10 }, - FlowStrategy = FlowStrategies.GetHorizontalFlow(), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(), AutoSizeAxes = Axes.Both, Children = new [] { @@ -170,7 +170,7 @@ namespace osu.Game.Screens.Select new FlowContainer { Margin = new MarginPadding { Top = 20 }, - FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(40, 0)), + FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(40, 0)), AutoSizeAxes = Axes.Both, Children = labels }, diff --git a/osu.Game/Screens/Select/FilterControl.cs b/osu.Game/Screens/Select/FilterControl.cs index 2aee714233..98eb0e43c0 100644 --- a/osu.Game/Screens/Select/FilterControl.cs +++ b/osu.Game/Screens/Select/FilterControl.cs @@ -44,7 +44,7 @@ namespace osu.Game.Screens.Select Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Width = 0.4f, // TODO: InnerWidth property or something - FlowStrategy = FlowStrategies.GetVerticalFlow(), + FlowStrategy = FlowStrategies.CreateVerticalFlow(), Children = new Drawable[] { searchTextBox = new SearchTextBox { @@ -177,7 +177,7 @@ namespace osu.Game.Screens.Select new FlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(10, 0)), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(10, 0)), Children = new Drawable[] { new TabItem @@ -208,7 +208,7 @@ namespace osu.Game.Screens.Select new FlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(10, 0)), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(10, 0)), Origin = Anchor.TopRight, Anchor = Anchor.TopRight, Children = new Drawable[] diff --git a/osu.Game/Screens/Select/Footer.cs b/osu.Game/Screens/Select/Footer.cs index 31cea60cdd..23935b0f40 100644 --- a/osu.Game/Screens/Select/Footer.cs +++ b/osu.Game/Screens/Select/Footer.cs @@ -98,13 +98,13 @@ namespace osu.Game.Screens.Select Position = new Vector2(BackButton.SIZE_EXTENDED.X + padding, 0), RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, - FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(padding, 0)), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(padding, 0)), Children = new Drawable[] { buttons = new FlowContainer { - FlowStrategy = FlowStrategies.GetHorizontalFlow(new Vector2(0.2f, 0)), + FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(0.2f, 0)), AutoSizeAxes = Axes.Both, } } From 8b3477820ffa3eed25566549381d8f241e5192b8 Mon Sep 17 00:00:00 2001 From: Jorolf Date: Tue, 28 Feb 2017 00:08:34 +0100 Subject: [PATCH 09/23] Disable mousewheel while playing --- osu.Game/Configuration/OsuConfigManager.cs | 2 +- osu.Game/Screens/Play/Player.cs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index ccf53ed714..84116a1f70 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -27,6 +27,7 @@ namespace osu.Game.Configuration Set(OsuConfig.DimLevel, 30, 0, 100); Set(OsuConfig.MouseDisableButtons, false); + Set(OsuConfig.MouseDisableWheel, false); Set(OsuConfig.SnakingInSliders, true); Set(OsuConfig.SnakingOutSliders, false); @@ -99,7 +100,6 @@ namespace osu.Game.Configuration Set(OsuConfig.UsePerBeatmapManiaSpeed, true).Disabled = true; Set(OsuConfig.ManiaSpeedBPMScale, true).Disabled = true; Set(OsuConfig.MenuTip, 0).Disabled = true; - Set(OsuConfig.MouseDisableWheel, false).Disabled = true; Set(OsuConfig.MouseSpeed, 1, 0.4, 6).Disabled = true; Set(OsuConfig.Offset, 0, -300, 300).Disabled = true; Set(OsuConfig.ScoreMeterScale, 1, 0.5, 2).Disabled = true; diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index b552601458..9ad10c298c 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -24,6 +24,7 @@ using OpenTK.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Transforms; using osu.Framework.Logging; +using osu.Framework.Input; namespace osu.Game.Screens.Play { @@ -159,6 +160,8 @@ namespace osu.Game.Screens.Play scoreOverlay, pauseOverlay }; + + mouseWheelDisabled = config.GetBindable(OsuConfig.MouseDisableWheel); } private void initializeSkipButton() @@ -325,5 +328,9 @@ namespace osu.Game.Screens.Play { Background?.FadeTo((100f - dimLevel) / 100, 800); } + + private Bindable mouseWheelDisabled; + + protected override bool OnWheel(InputState state) => mouseWheelDisabled.Value && !isPaused; } } \ No newline at end of file From aa9582c0fa6a5d07dc6c345ae859e68520203fa8 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 28 Feb 2017 11:28:12 +0900 Subject: [PATCH 10/23] Add exponential fall-off of triangles' alpha values. --- osu.Game/Graphics/Backgrounds/Triangles.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/osu.Game/Graphics/Backgrounds/Triangles.cs b/osu.Game/Graphics/Backgrounds/Triangles.cs index 219af9bd38..1eac06d472 100644 --- a/osu.Game/Graphics/Backgrounds/Triangles.cs +++ b/osu.Game/Graphics/Backgrounds/Triangles.cs @@ -10,6 +10,7 @@ using osu.Framework.MathUtils; using OpenTK; using OpenTK.Graphics; using System; +using osu.Framework.Graphics.Colour; namespace osu.Game.Graphics.Backgrounds { @@ -37,6 +38,12 @@ namespace osu.Game.Graphics.Backgrounds private float triangleScale = 1; + /// + /// Whether we should exponentially drop-off alpha values to improve the visual appearance of unbuffered fades. + /// This defaults to on as it is generally more aesthetically pleasing, but should be turned off in buffered contexts. + /// + public bool ExponentialAlphaAdjust = true; + public float TriangleScale { get { return triangleScale; } @@ -63,8 +70,11 @@ namespace osu.Game.Graphics.Backgrounds { base.Update(); + float adjustedAlpha = ExponentialAlphaAdjust ? (float)Math.Pow(((Color4)DrawInfo.Colour.Colour).A, 3) : 1; + foreach (var t in Children) { + t.Alpha = adjustedAlpha; t.Position -= new Vector2(0, (float)(t.Scale.X * (50 / DrawHeight) * (Time.Elapsed / 950)) / triangleScale); if (ExpireOffScreenTriangles && t.DrawPosition.Y + t.DrawSize.Y * t.Scale.Y < 0) t.Expire(); From 3208b3d8b4a9f919d2a64b49f34285bf359ef3e0 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Tue, 28 Feb 2017 11:37:08 +0800 Subject: [PATCH 11/23] EditorConfig naming style settings for vs2017. --- .editorconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.editorconfig b/.editorconfig index 759217430d..0dd7ef8ed1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,3 +7,21 @@ insert_final_newline = true indent_style = space indent_size = 4 trim_trailing_whitespace = true + +#Roslyn naming styles + +#PascalCase for public and protected members +dotnet_naming_style.pascalcase.capitalization = pascal_case +dotnet_naming_symbols.public_members.applicable_accessibilities = public,internal,protected,protected_internal +dotnet_naming_symbols.public_members.applicable_kinds = property,method,field,event,delegate +dotnet_naming_rule.public_members_pascalcase.severity = suggestion +dotnet_naming_rule.public_members_pascalcase.symbols = public_members +dotnet_naming_rule.public_members_pascalcase.style = pascalcase + +#camelCase for private members +dotnet_naming_style.camelcase.capitalization = camel_case +dotnet_naming_symbols.private_members.applicable_accessibilities = private +dotnet_naming_symbols.private_members.applicable_kinds = property,method,field,event,delegate +dotnet_naming_rule.private_members_camelcase.severity = suggestion +dotnet_naming_rule.private_members_camelcase.symbols = private_members +dotnet_naming_rule.private_members_camelcase.style = camelcase \ No newline at end of file From 654859a2a1f17fbadf99f9e9ee950bf7eb79bbe3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 28 Feb 2017 13:56:30 +0900 Subject: [PATCH 12/23] Restore potentially breaking change. --- osu.Game/Database/BeatmapDatabase.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index 5337c0faa5..fc2c7558b0 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -25,12 +25,14 @@ namespace osu.Game.Database public event Action BeatmapSetAdded; public event Action BeatmapSetRemoved; + private BeatmapImporter ipc; + public BeatmapDatabase(Storage storage, GameHost importHost = null) { this.storage = storage; if (importHost != null) - new BeatmapImporter(importHost, this); + ipc = new BeatmapImporter(importHost, this); if (connection == null) { From 522034020e3de16d46aae9bff5753d6f7d9beb10 Mon Sep 17 00:00:00 2001 From: Jorolf Date: Tue, 28 Feb 2017 11:44:12 +0100 Subject: [PATCH 13/23] Moved Bindable init --- osu.Game/Screens/Play/Player.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 9ad10c298c..46f93900fc 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -73,6 +73,8 @@ namespace osu.Game.Screens.Play private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game, OsuConfigManager config) { dimLevel = config.GetBindable(OsuConfig.DimLevel); + mouseWheelDisabled = config.GetBindable(OsuConfig.MouseDisableWheel); + try { if (Beatmap == null) @@ -160,8 +162,6 @@ namespace osu.Game.Screens.Play scoreOverlay, pauseOverlay }; - - mouseWheelDisabled = config.GetBindable(OsuConfig.MouseDisableWheel); } private void initializeSkipButton() From 585d42f89f44386cabc5d4423e9edfee0ed9bb10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Tue, 28 Feb 2017 19:01:02 +0100 Subject: [PATCH 14/23] Improve naming and correctness of triangles fading --- osu.Game/Graphics/Backgrounds/Triangles.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/osu.Game/Graphics/Backgrounds/Triangles.cs b/osu.Game/Graphics/Backgrounds/Triangles.cs index 1eac06d472..f3b75ce91a 100644 --- a/osu.Game/Graphics/Backgrounds/Triangles.cs +++ b/osu.Game/Graphics/Backgrounds/Triangles.cs @@ -39,10 +39,11 @@ namespace osu.Game.Graphics.Backgrounds private float triangleScale = 1; /// - /// Whether we should exponentially drop-off alpha values to improve the visual appearance of unbuffered fades. - /// This defaults to on as it is generally more aesthetically pleasing, but should be turned off in buffered contexts. + /// Whether we should drop-off alpha values of triangles more quickly to improve + /// the visual appearance of fading. This defaults to on as it is generally more + /// aesthetically pleasing, but should be turned off in s. /// - public bool ExponentialAlphaAdjust = true; + public bool HideAlphaDiscrepancies = true; public float TriangleScale { @@ -70,7 +71,10 @@ namespace osu.Game.Graphics.Backgrounds { base.Update(); - float adjustedAlpha = ExponentialAlphaAdjust ? (float)Math.Pow(((Color4)DrawInfo.Colour.Colour).A, 3) : 1; + float adjustedAlpha = HideAlphaDiscrepancies ? + // Cubically scale alpha to make it drop off more sharply. + (float)Math.Pow(DrawInfo.Colour.AverageColour.Linear.A, 3) : + 1; foreach (var t in Children) { From f0e9ed463627284e1cae8cf52e180a22cea7c958 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Mar 2017 11:56:14 +0900 Subject: [PATCH 15/23] Fix regression in TrianglesPiece. --- osu.Game.Modes.Osu/Objects/Drawables/Pieces/TrianglesPiece.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/TrianglesPiece.cs b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/TrianglesPiece.cs index 33ed93e625..26d44f3865 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/TrianglesPiece.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/TrianglesPiece.cs @@ -14,6 +14,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces public TrianglesPiece() { TriangleScale = 1.2f; + HideAlphaDiscrepancies = false; } protected override void Update() From ec83da2845260a4163034ba5284e190eb46af52a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Mar 2017 11:56:26 +0900 Subject: [PATCH 16/23] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index b061324151..4c0762eec2 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit b0613241512e46eed9dc16ae08ed4064d2db4101 +Subproject commit 4c0762eec20d2a3063df908a49432326570bea9f From 22c46ec9fb03dacb89cc413131781a30e63e7094 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Mar 2017 13:03:33 +0900 Subject: [PATCH 17/23] Fix CI? --- osu.Desktop.Tests/osu.Desktop.Tests.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/osu.Desktop.Tests/osu.Desktop.Tests.csproj b/osu.Desktop.Tests/osu.Desktop.Tests.csproj index 9037acb220..07495311e0 100644 --- a/osu.Desktop.Tests/osu.Desktop.Tests.csproj +++ b/osu.Desktop.Tests/osu.Desktop.Tests.csproj @@ -54,9 +54,6 @@ $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net40\SQLite.Net.Platform.Generic.dll - - $(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll - From cc92459ee14d995ad2c78f437188e796ce5eb5a1 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Wed, 1 Mar 2017 13:22:01 +0300 Subject: [PATCH 18/23] KeyCounter visibility --- osu.Game/Configuration/OsuConfigManager.cs | 3 ++- osu.Game/Modes/UI/ScoreOverlay.cs | 24 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 84116a1f70..70bfbb5992 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -33,6 +33,8 @@ namespace osu.Game.Configuration Set(OsuConfig.SnakingOutSliders, false); Set(OsuConfig.MenuParallax, true); + + Set(OsuConfig.KeyOverlay, false); //todo: implement all settings below this line (remove the Disabled set when doing so). Set(OsuConfig.MouseSpeed, 1.0).Disabled = true; @@ -80,7 +82,6 @@ namespace osu.Game.Configuration Set(OsuConfig.IgnoreBeatmapSamples, false).Disabled = true; Set(OsuConfig.IgnoreBeatmapSkins, false).Disabled = true; Set(OsuConfig.IgnoreList, string.Empty).Disabled = true; - Set(OsuConfig.KeyOverlay, false).Disabled = true; Set(OsuConfig.Language, @"unknown").Disabled = true; Set(OsuConfig.AllowNowPlayingHighlights, false).Disabled = true; Set(OsuConfig.LastVersion, string.Empty).Disabled = true; diff --git a/osu.Game/Modes/UI/ScoreOverlay.cs b/osu.Game/Modes/UI/ScoreOverlay.cs index e43009adda..cd676fc7ef 100644 --- a/osu.Game/Modes/UI/ScoreOverlay.cs +++ b/osu.Game/Modes/UI/ScoreOverlay.cs @@ -9,6 +9,9 @@ using osu.Game.Modes.Objects; using OpenTK; using osu.Framework.Graphics.Primitives; using osu.Game.Screens.Play; +using osu.Framework.Allocation; +using osu.Game.Configuration; +using osu.Framework.Configuration; namespace osu.Game.Modes.UI { @@ -21,6 +24,8 @@ namespace osu.Game.Modes.UI public HealthDisplay HealthDisplay; public Score Score { get; set; } + private Bindable showKeyCounter; + protected abstract KeyCounterCollection CreateKeyCounter(); protected abstract ComboCounter CreateComboCounter(); protected abstract PercentageCounter CreateAccuracyCounter(); @@ -58,6 +63,25 @@ namespace osu.Game.Modes.UI }; } + [BackgroundDependencyLoader] + private void load(OsuConfigManager config) + { + showKeyCounter = config.GetBindable(OsuConfig.KeyOverlay); + + if (showKeyCounter) + KeyCounter.Show(); + else KeyCounter.Hide(); + + showKeyCounter.ValueChanged += visibilityChanged; + } + + private void visibilityChanged(object sender, EventArgs e) + { + if (showKeyCounter) + KeyCounter.Show(); + else KeyCounter.Hide(); + } + public void BindProcessor(ScoreProcessor processor) { //bind processor bindables to combocounter, score display etc. From a6504e8f220c52b7744803b9451a6f420f49e114 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Wed, 1 Mar 2017 13:36:53 +0300 Subject: [PATCH 19/23] Triggering fix --- osu.Game/Modes/UI/ScoreOverlay.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/osu.Game/Modes/UI/ScoreOverlay.cs b/osu.Game/Modes/UI/ScoreOverlay.cs index cd676fc7ef..d9283c52cb 100644 --- a/osu.Game/Modes/UI/ScoreOverlay.cs +++ b/osu.Game/Modes/UI/ScoreOverlay.cs @@ -67,19 +67,16 @@ namespace osu.Game.Modes.UI private void load(OsuConfigManager config) { showKeyCounter = config.GetBindable(OsuConfig.KeyOverlay); - - if (showKeyCounter) - KeyCounter.Show(); - else KeyCounter.Hide(); - showKeyCounter.ValueChanged += visibilityChanged; + showKeyCounter.TriggerChange(); } private void visibilityChanged(object sender, EventArgs e) { if (showKeyCounter) KeyCounter.Show(); - else KeyCounter.Hide(); + else + KeyCounter.Hide(); } public void BindProcessor(ScoreProcessor processor) From 9c853b04657816be24263cb8e3dc2b9e281670b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 1 Mar 2017 19:33:01 +0100 Subject: [PATCH 20/23] =?UTF-8?q?Update=20framew=C3=B6rk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- osu-framework | 2 +- .../Tests/TestCaseTextAwesome.cs | 4 +- osu.Desktop/Overlays/VersionManager.cs | 9 +-- .../Objects/Drawables/HitExplosion.cs | 5 +- osu.Game/Beatmaps/Drawables/BeatmapGroup.cs | 66 ------------------- osu.Game/Beatmaps/Drawables/BeatmapPanel.cs | 13 ++-- .../Beatmaps/Drawables/BeatmapSetHeader.cs | 12 ++-- .../UserInterface/OsuDropDownMenuItem.cs | 4 +- .../Graphics/UserInterface/StarCounter.cs | 5 +- .../UserInterface/Volume/VolumeControl.cs | 4 +- .../Online/Chat/Drawables/DrawableChannel.cs | 6 +- osu.Game/Overlays/NotificationManager.cs | 4 +- .../Notifications/NotificationSection.cs | 12 ++-- osu.Game/Overlays/Options/OptionDropDown.cs | 4 +- osu.Game/Overlays/Options/OptionSlider.cs | 3 +- osu.Game/Overlays/Options/OptionsSection.cs | 7 +- .../Overlays/Options/OptionsSubsection.cs | 9 +-- .../Options/Sections/EditorSection.cs | 2 +- .../Options/Sections/General/LoginOptions.cs | 5 +- .../Options/Sections/MaintenanceSection.cs | 2 +- .../Overlays/Options/Sections/SkinSection.cs | 2 +- osu.Game/Overlays/Options/Sidebar.cs | 6 +- osu.Game/Overlays/OptionsOverlay.cs | 8 +-- osu.Game/Overlays/Pause/PauseOverlay.cs | 16 +++-- osu.Game/Overlays/Toolbar/Toolbar.cs | 8 +-- osu.Game/Overlays/Toolbar/ToolbarButton.cs | 13 ++-- .../Overlays/Toolbar/ToolbarModeSelector.cs | 6 +- osu.Game/Screens/GameScreenWhiteBox.cs | 6 +- osu.Game/Screens/Menu/ButtonSystem.cs | 3 +- osu.Game/Screens/Menu/Disclaimer.cs | 5 +- .../Screens/Menu/FlowContainerWithOrigin.cs | 4 +- osu.Game/Screens/Play/KeyCounterCollection.cs | 4 +- osu.Game/Screens/Play/PlayerLoader.cs | 4 +- osu.Game/Screens/Ranking/Results.cs | 4 +- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 12 ++-- osu.Game/Screens/Select/FilterControl.cs | 14 ++-- osu.Game/Screens/Select/Footer.cs | 13 ++-- 37 files changed, 127 insertions(+), 179 deletions(-) diff --git a/osu-framework b/osu-framework index 995e80742b..f3aea04b0e 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 995e80742b289dbe1e7655c39148b1773876d52a +Subproject commit f3aea04b0e6a6ebb6d6f24fcb2134058765c0df0 diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTextAwesome.cs b/osu.Desktop.VisualTests/Tests/TestCaseTextAwesome.cs index 7502c623fe..ce3650fe61 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTextAwesome.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTextAwesome.cs @@ -22,9 +22,9 @@ namespace osu.Desktop.VisualTests.Tests { base.Reset(); - FlowContainer flow; + FillFlowContainer flow; - Add(flow = new FlowContainer() + Add(flow = new FillFlowContainer() { RelativeSizeAxes = Axes.Both, Size = new Vector2(0.5f), diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Desktop/Overlays/VersionManager.cs index 8c3f7ceaa4..92c4e25136 100644 --- a/osu.Desktop/Overlays/VersionManager.cs +++ b/osu.Desktop/Overlays/VersionManager.cs @@ -57,16 +57,17 @@ namespace osu.Desktop.Overlays Children = new Drawable[] { - new FlowContainer + new FillFlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, Children = new Drawable[] { - new FlowContainer + new FillFlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(5)), + Direction = FlowDirection.Right, + Spacing = new Vector2(5), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Children = new Drawable[] diff --git a/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs b/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs index 545f71567a..9a0a532739 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs @@ -13,7 +13,7 @@ using OpenTK.Graphics; namespace osu.Game.Modes.Osu.Objects.Drawables { - public class HitExplosion : FlowContainer + public class HitExplosion : FillFlowContainer { private readonly OsuJudgementInfo judgement; private SpriteText line1; @@ -25,7 +25,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables AutoSizeAxes = Axes.Both; Origin = Anchor.Centre; - FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 2)); + Direction = FlowDirection.Down; + Spacing = new Vector2(0, 2); Position = (h?.StackedEndPosition ?? Vector2.Zero) + judgement.PositionOffset; Children = new Drawable[] diff --git a/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs b/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs index 301a81d4b5..9c1f1a02fc 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs @@ -8,72 +8,6 @@ using osu.Framework; using osu.Framework.Graphics; using osu.Game.Database; -namespace osu.Game.Beatmaps.Drawables -{ - class BeatmapGroup : IStateful - { - public BeatmapPanel SelectedPanel; - - /// - /// Fires when one of our difficulties was selected. Will fire on first expand. - /// - public Action SelectionChanged; - - /// - /// Fires when one of our difficulties is clicked when already selected. Should start playing the map. - /// - public Action StartRequested; - - public BeatmapSetHeader Header; - - private BeatmapGroupState state; - - public List BeatmapPanels; - - public BeatmapSetInfo BeatmapSet; - - public BeatmapGroupState State - { - get { return state; } - set - { - switch (value) - { - case BeatmapGroupState.Expanded: - Header.State = PanelSelectedState.Selected; - foreach (BeatmapPanel panel in BeatmapPanels) - panel.State = panel == SelectedPanel ? PanelSelectedState.Selected : PanelSelectedState.NotSelected; - break; - case BeatmapGroupState.Collapsed: - Header.State = PanelSelectedState.NotSelected; - foreach (BeatmapPanel panel in BeatmapPanels) - panel.State = PanelSelectedState.Hidden; - break; - case BeatmapGroupState.Hidden: - Header.State = PanelSelectedState.Hidden; - foreach (BeatmapPanel panel in BeatmapPanels) - panel.State = PanelSelectedState.Hidden; - break; - } - state = value; - } - } - - public BeatmapGroup(BeatmapSetInfo beatmapSet, BeatmapDatabase database) - { - BeatmapSet = beatmapSet; - WorkingBeatmap beatmap = database.GetWorkingBeatmap(BeatmapSet.Beatmaps.FirstOrDefault()); - foreach (var b in BeatmapSet.Beatmaps) -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; -using System.Collections.Generic; -using System.Linq; -using osu.Framework; -using osu.Framework.Graphics; -using osu.Game.Database; - namespace osu.Game.Beatmaps.Drawables { class BeatmapGroup : IStateful diff --git a/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs b/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs index 7e8b0068c1..24808ed1dd 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs @@ -83,10 +83,10 @@ namespace osu.Game.Beatmaps.Drawables ColourLight = OsuColour.FromHex(@"3a7285"), ColourDark = OsuColour.FromHex(@"123744") }, - new FlowContainer + new FillFlowContainer { Padding = new MarginPadding(5), - FlowStrategy = FlowStrategies.CreateHorizontalFlow(), + Direction = FlowDirection.Right, AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, @@ -98,16 +98,17 @@ namespace osu.Game.Beatmaps.Drawables Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, }, - new FlowContainer + new FillFlowContainer { Padding = new MarginPadding { Left = 5 }, - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, AutoSizeAxes = Axes.Both, Children = new Drawable[] { - new FlowContainer + new FillFlowContainer { - FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(4, 0)), + Direction = FlowDirection.Right, + Spacing = new Vector2(4, 0), AutoSizeAxes = Axes.Both, Children = new[] { diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index 0998423d47..4dbee876d0 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -24,7 +24,7 @@ namespace osu.Game.Beatmaps.Drawables private OsuConfigManager config; private Bindable preferUnicode; private WorkingBeatmap beatmap; - private FlowContainer difficultyIcons; + private FillFlowContainer difficultyIcons; public BeatmapSetHeader(WorkingBeatmap beatmap) { @@ -36,9 +36,9 @@ namespace osu.Game.Beatmaps.Drawables { RelativeSizeAxes = Axes.Both, }, - new FlowContainer + new FillFlowContainer { - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 }, AutoSizeAxes = Axes.Both, Children = new[] @@ -58,7 +58,7 @@ namespace osu.Game.Beatmaps.Drawables TextSize = 17, Shadow = true, }, - difficultyIcons = new FlowContainer + difficultyIcons = new FillFlowContainer { Margin = new MarginPadding { Top = 5 }, AutoSizeAxes = Axes.Both, @@ -109,10 +109,10 @@ namespace osu.Game.Beatmaps.Drawables Children = new[] { - new FlowContainer + new FillFlowContainer { Depth = -1, - FlowStrategy = FlowStrategies.CreateHorizontalFlow(), + Direction = FlowDirection.Right, RelativeSizeAxes = Axes.Both, // This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle Shear = new Vector2(0.8f, 0), diff --git a/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs b/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs index f1f055fb6a..88179be7a3 100644 --- a/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs +++ b/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs @@ -19,9 +19,9 @@ namespace osu.Game.Graphics.UserInterface Children = new[] { - new FlowContainer + new FillFlowContainer { - FlowStrategy = FlowStrategies.CreateHorizontalFlow(), + Direction = FlowDirection.Right, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] diff --git a/osu.Game/Graphics/UserInterface/StarCounter.cs b/osu.Game/Graphics/UserInterface/StarCounter.cs index 70b189d1d7..c1f87325ab 100644 --- a/osu.Game/Graphics/UserInterface/StarCounter.cs +++ b/osu.Game/Graphics/UserInterface/StarCounter.cs @@ -68,10 +68,11 @@ namespace osu.Game.Graphics.UserInterface Children = new Drawable[] { - stars = new FlowContainer + stars = new FillFlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(star_spacing)), + Direction = FlowDirection.Right, + Spacing = new Vector2(star_spacing), } }; diff --git a/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs b/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs index d1e2a9b178..04ba2fcd2f 100644 --- a/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs +++ b/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs @@ -33,13 +33,13 @@ namespace osu.Game.Graphics.UserInterface.Volume Children = new Drawable[] { - new FlowContainer + new FillFlowContainer { AutoSizeAxes = Axes.Both, Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, Margin = new MarginPadding { Left = 10, Right = 10, Top = 30, Bottom = 30 }, - FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(15, 0)), + Spacing = new Vector2(15, 0), Children = new Drawable[] { volumeMeterMaster = new VolumeMeter("Master"), diff --git a/osu.Game/Online/Chat/Drawables/DrawableChannel.cs b/osu.Game/Online/Chat/Drawables/DrawableChannel.cs index d665e39b24..ee8f6edd28 100644 --- a/osu.Game/Online/Chat/Drawables/DrawableChannel.cs +++ b/osu.Game/Online/Chat/Drawables/DrawableChannel.cs @@ -15,7 +15,7 @@ namespace osu.Game.Online.Chat.Drawables public class DrawableChannel : Container { private readonly Channel channel; - private FlowContainer flow; + private FillFlowContainer flow; private ScrollContainer scroll; public DrawableChannel(Channel channel) @@ -39,9 +39,9 @@ namespace osu.Game.Online.Chat.Drawables RelativeSizeAxes = Axes.Both, Children = new Drawable[] { - flow = new FlowContainer + flow = new FillFlowContainer { - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Left = 20, Right = 20 } diff --git a/osu.Game/Overlays/NotificationManager.cs b/osu.Game/Overlays/NotificationManager.cs index 70d5860510..3e36113617 100644 --- a/osu.Game/Overlays/NotificationManager.cs +++ b/osu.Game/Overlays/NotificationManager.cs @@ -44,9 +44,9 @@ namespace osu.Game.Overlays Margin = new MarginPadding { Top = Toolbar.Toolbar.HEIGHT }, Children = new[] { - sections = new FlowContainer + sections = new FillFlowContainer { - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, Children = new [] diff --git a/osu.Game/Overlays/Notifications/NotificationSection.cs b/osu.Game/Overlays/Notifications/NotificationSection.cs index 90b142d5ae..7d95700431 100644 --- a/osu.Game/Overlays/Notifications/NotificationSection.cs +++ b/osu.Game/Overlays/Notifications/NotificationSection.cs @@ -16,7 +16,7 @@ using OpenTK; namespace osu.Game.Overlays.Notifications { - public class NotificationSection : FlowContainer + public class NotificationSection : FillFlowContainer { private OsuSpriteText titleText; private OsuSpriteText countText; @@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Notifications { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - FlowStrategy = FlowStrategies.CreateVerticalFlow(); + Direction = FlowDirection.Down; Padding = new MarginPadding { @@ -85,13 +85,13 @@ namespace osu.Game.Overlays.Notifications Origin = Anchor.TopRight, Action = clearAll }, - new FlowContainer + new FillFlowContainer { Margin = new MarginPadding { Bottom = 5 }, - FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(5, 0)), + Spacing = new Vector2(5, 0), AutoSizeAxes = Axes.Both, Children = new Drawable[] { @@ -110,13 +110,13 @@ namespace osu.Game.Overlays.Notifications }, }, }, - notifications = new FlowContainer + notifications = new FillFlowContainer { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, LayoutDuration = 150, LayoutEasing = EasingTypes.OutQuart, - FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(3)), + Spacing = new Vector2(3), } }); } diff --git a/osu.Game/Overlays/Options/OptionDropDown.cs b/osu.Game/Overlays/Options/OptionDropDown.cs index 67e995f482..7c4b82e198 100644 --- a/osu.Game/Overlays/Options/OptionDropDown.cs +++ b/osu.Game/Overlays/Options/OptionDropDown.cs @@ -14,7 +14,7 @@ using System.Collections.Generic; namespace osu.Game.Overlays.Options { - public class OptionDropDown : FlowContainer + public class OptionDropDown : FillFlowContainer { private DropDownMenu dropdown; private SpriteText text; @@ -89,7 +89,7 @@ namespace osu.Game.Overlays.Options { Items = new KeyValuePair[0]; - FlowStrategy = FlowStrategies.CreateVerticalFlow(); + Direction = FlowDirection.Down; RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Children = new Drawable[] diff --git a/osu.Game/Overlays/Options/OptionSlider.cs b/osu.Game/Overlays/Options/OptionSlider.cs index 58635b4345..2f09c51655 100644 --- a/osu.Game/Overlays/Options/OptionSlider.cs +++ b/osu.Game/Overlays/Options/OptionSlider.cs @@ -12,7 +12,7 @@ using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Options { - public class OptionSlider : FlowContainer where T : struct + public class OptionSlider : FillFlowContainer where T : struct { private SliderBar slider; private SpriteText text; @@ -40,7 +40,6 @@ namespace osu.Game.Overlays.Options public OptionSlider() { - FlowStrategy = FlowStrategies.CreateFillFlow(); RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Padding = new MarginPadding { Right = 5 }; diff --git a/osu.Game/Overlays/Options/OptionsSection.cs b/osu.Game/Overlays/Options/OptionsSection.cs index 7f01ff91d8..1775744b26 100644 --- a/osu.Game/Overlays/Options/OptionsSection.cs +++ b/osu.Game/Overlays/Options/OptionsSection.cs @@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Options { public abstract class OptionsSection : Container { - protected FlowContainer FlowContent; + protected FillFlowContainer FlowContent; protected override Container Content => FlowContent; public abstract FontAwesome Icon { get; } @@ -58,10 +58,11 @@ namespace osu.Game.Overlays.Options TextSize = header_size, Text = Header, }, - FlowContent = new FlowContainer + FlowContent = new FillFlowContainer { Margin = new MarginPadding { Top = header_size + header_margin }, - FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 30)), + Direction = FlowDirection.Down, + Spacing = new Vector2(0, 30), AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, }, diff --git a/osu.Game/Overlays/Options/OptionsSubsection.cs b/osu.Game/Overlays/Options/OptionsSubsection.cs index 7fbb2ac3b1..04b0114b22 100644 --- a/osu.Game/Overlays/Options/OptionsSubsection.cs +++ b/osu.Game/Overlays/Options/OptionsSubsection.cs @@ -9,7 +9,7 @@ using osu.Game.Graphics.Sprites; namespace osu.Game.Overlays.Options { - public abstract class OptionsSubsection : FlowContainer + public abstract class OptionsSubsection : FillFlowContainer { private Container content; protected override Container Content => content; @@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Options { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - FlowStrategy = FlowStrategies.CreateVerticalFlow(); + Direction = FlowDirection.Down; AddInternal(new Drawable[] { new OsuSpriteText @@ -29,9 +29,10 @@ namespace osu.Game.Overlays.Options Margin = new MarginPadding { Bottom = 10 }, Font = @"Exo2.0-Black", }, - content = new FlowContainer + content = new FillFlowContainer { - FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 5)), + Direction = FlowDirection.Down, + Spacing = new Vector2(0, 5), RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, }, diff --git a/osu.Game/Overlays/Options/Sections/EditorSection.cs b/osu.Game/Overlays/Options/Sections/EditorSection.cs index 0484806044..11d3f6b642 100644 --- a/osu.Game/Overlays/Options/Sections/EditorSection.cs +++ b/osu.Game/Overlays/Options/Sections/EditorSection.cs @@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Options.Sections [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - FlowContent.FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(0, 5)); + FlowContent.Spacing = new Vector2(0, 5); Children = new Drawable[] { new OsuCheckbox diff --git a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs index 15d0a480b5..b6f5d0ea68 100644 --- a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs @@ -84,7 +84,7 @@ namespace osu.Game.Overlays.Options.Sections.General } } - class LoginForm : FlowContainer + class LoginForm : FillFlowContainer { private TextBox username; private TextBox password; @@ -100,7 +100,8 @@ namespace osu.Game.Overlays.Options.Sections.General private void load(APIAccess api, OsuConfigManager config) { this.api = api; - FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 5)); + Direction = FlowDirection.Down; + Spacing = new Vector2(0, 5); AutoSizeAxes = Axes.Y; RelativeSizeAxes = Axes.X; Children = new Drawable[] diff --git a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs index 13c479b1ee..5393c42843 100644 --- a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs +++ b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs @@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Options.Sections public MaintenanceSection() { - FlowContent.FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(0, 5)); + FlowContent.Spacing = new Vector2(0, 5); Children = new Drawable[] { new OsuButton diff --git a/osu.Game/Overlays/Options/Sections/SkinSection.cs b/osu.Game/Overlays/Options/Sections/SkinSection.cs index 5e262d4109..71c460760e 100644 --- a/osu.Game/Overlays/Options/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Options/Sections/SkinSection.cs @@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Options.Sections [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - FlowContent.FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(0, 5)); + FlowContent.Spacing = new Vector2(0, 5); Children = new Drawable[] { new OptionLabel { Text = "TODO: Skin preview textures" }, diff --git a/osu.Game/Overlays/Options/Sidebar.cs b/osu.Game/Overlays/Options/Sidebar.cs index 47b3cfa0ca..fc47ea35be 100644 --- a/osu.Game/Overlays/Options/Sidebar.cs +++ b/osu.Game/Overlays/Options/Sidebar.cs @@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Options { public class Sidebar : Container { - private FlowContainer content; + private FillFlowContainer content; internal const float DEFAULT_WIDTH = ToolbarButton.WIDTH; internal const int EXPANDED_WIDTH = 200; protected override Container Content => content; @@ -34,13 +34,13 @@ namespace osu.Game.Overlays.Options { Children = new [] { - content = new FlowContainer + content = new FillFlowContainer { Origin = Anchor.CentreLeft, Anchor = Anchor.CentreLeft, AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, } } }, diff --git a/osu.Game/Overlays/OptionsOverlay.cs b/osu.Game/Overlays/OptionsOverlay.cs index 8aabc98771..e88535915f 100644 --- a/osu.Game/Overlays/OptionsOverlay.cs +++ b/osu.Game/Overlays/OptionsOverlay.cs @@ -73,11 +73,11 @@ namespace osu.Game.Overlays Margin = new MarginPadding { Left = SIDEBAR_WIDTH }, Children = new[] { - new FlowContainer + new FillFlowContainer { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, Children = new Drawable[] { @@ -94,11 +94,11 @@ namespace osu.Game.Overlays TextSize = 18, Margin = new MarginPadding { Left = CONTENT_MARGINS, Bottom = 30 }, }, - new FlowContainer + new FillFlowContainer { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, Children = sections, } } diff --git a/osu.Game/Overlays/Pause/PauseOverlay.cs b/osu.Game/Overlays/Pause/PauseOverlay.cs index 198fe2ffef..a39a8d49d6 100644 --- a/osu.Game/Overlays/Pause/PauseOverlay.cs +++ b/osu.Game/Overlays/Pause/PauseOverlay.cs @@ -66,7 +66,7 @@ namespace osu.Game.Overlays.Pause } } - private FlowContainer retryCounterContainer; + private FillFlowContainer retryCounterContainer; public override bool Contains(Vector2 screenSpacePos) => true; public override bool HandleInput => State == Visibility.Visible; @@ -100,19 +100,21 @@ namespace osu.Game.Overlays.Pause Colour = Color4.Black, Alpha = background_alpha, }, - new FlowContainer + new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 50)), + Direction = FlowDirection.Down, + Spacing = new Vector2(0, 50), Origin = Anchor.Centre, Anchor = Anchor.Centre, Children = new Drawable[] { - new FlowContainer + new FillFlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 20)), + Direction = FlowDirection.Down, + Spacing = new Vector2(0, 20), Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, Children = new Drawable[] @@ -139,7 +141,7 @@ namespace osu.Game.Overlays.Pause } } }, - new FlowContainer + new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, @@ -186,7 +188,7 @@ namespace osu.Game.Overlays.Pause } } }, - retryCounterContainer = new FlowContainer + retryCounterContainer = new FillFlowContainer { AutoSizeAxes = Axes.Both, Origin = Anchor.TopCentre, diff --git a/osu.Game/Overlays/Toolbar/Toolbar.cs b/osu.Game/Overlays/Toolbar/Toolbar.cs index f9dbb6132a..afb30b31c0 100644 --- a/osu.Game/Overlays/Toolbar/Toolbar.cs +++ b/osu.Game/Overlays/Toolbar/Toolbar.cs @@ -41,9 +41,9 @@ namespace osu.Game.Overlays.Toolbar Children = new Drawable[] { new ToolbarBackground(), - new FlowContainer + new FillFlowContainer { - FlowStrategy = FlowStrategies.CreateHorizontalFlow(), + Direction = FlowDirection.Right, RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] @@ -63,7 +63,7 @@ namespace osu.Game.Overlays.Toolbar { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, - FlowStrategy = FlowStrategies.CreateHorizontalFlow(), + Direction = FlowDirection.Right, RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] @@ -141,7 +141,7 @@ namespace osu.Game.Overlays.Toolbar FadeOut(transition_time); } - class PassThroughFlowContainer : FlowContainer + class PassThroughFlowContainer : FillFlowContainer { //needed to get input to the login overlay. public override bool Contains(Vector2 screenSpacePos) => true; diff --git a/osu.Game/Overlays/Toolbar/ToolbarButton.cs b/osu.Game/Overlays/Toolbar/ToolbarButton.cs index 245311b739..7d1438dd1d 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarButton.cs @@ -62,10 +62,10 @@ namespace osu.Game.Overlays.Toolbar protected TextAwesome DrawableIcon; protected SpriteText DrawableText; protected Box HoverBackground; - private FlowContainer tooltipContainer; + private FillFlowContainer tooltipContainer; private SpriteText tooltip1; private SpriteText tooltip2; - protected FlowContainer Flow; + protected FillFlowContainer Flow; private SampleChannel sampleClick; public ToolbarButton() @@ -82,9 +82,10 @@ namespace osu.Game.Overlays.Toolbar BlendingMode = BlendingMode.Additive, Alpha = 0, }, - Flow = new FlowContainer + Flow = new FillFlowContainer { - FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(5)), + Direction = FlowDirection.Right, + Spacing = new Vector2(5), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Padding = new MarginPadding { Left = Toolbar.HEIGHT / 2, Right = Toolbar.HEIGHT / 2 }, @@ -104,9 +105,9 @@ namespace osu.Game.Overlays.Toolbar }, }, }, - tooltipContainer = new FlowContainer + tooltipContainer = new FillFlowContainer { - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, RelativeSizeAxes = Axes.Both, //stops us being considered in parent's autosize Anchor = (TooltipAnchor & Anchor.x0) > 0 ? Anchor.BottomLeft : Anchor.BottomRight, Origin = TooltipAnchor, diff --git a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs index d499238cf7..94f62ce54d 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs @@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Toolbar { const float padding = 10; - private FlowContainer modeButtons; + private FillFlowContainer modeButtons; private Drawable modeButtonLine; private ToolbarModeButton activeButton; @@ -32,11 +32,11 @@ namespace osu.Game.Overlays.Toolbar Children = new Drawable[] { new OpaqueBackground(), - modeButtons = new FlowContainer + modeButtons = new FillFlowContainer { RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, - FlowStrategy = FlowStrategies.CreateHorizontalFlow(), + Direction = FlowDirection.Right, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Padding = new MarginPadding { Left = padding, Right = padding }, diff --git a/osu.Game/Screens/GameScreenWhiteBox.cs b/osu.Game/Screens/GameScreenWhiteBox.cs index a4adfd5201..5d486d9e4c 100644 --- a/osu.Game/Screens/GameScreenWhiteBox.cs +++ b/osu.Game/Screens/GameScreenWhiteBox.cs @@ -25,7 +25,7 @@ namespace osu.Game.Screens protected virtual IEnumerable PossibleChildren => null; - private FlowContainer childModeButtons; + private FillFlowContainer childModeButtons; private Container textContainer; private Box box; @@ -124,9 +124,9 @@ namespace osu.Game.Screens Exit(); } }, - childModeButtons = new FlowContainer + childModeButtons = new FillFlowContainer { - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, RelativeSizeAxes = Axes.Both, diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index e21e11dfb7..0f8ac6c31a 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -78,7 +78,8 @@ namespace osu.Game.Screens.Menu }, buttonFlow = new FlowContainerWithOrigin { - FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(-WEDGE_WIDTH, 0)), + Direction = FlowDirection.Right, + Spacing = new Vector2(-WEDGE_WIDTH, 0), Anchor = Anchor.Centre, AutoSizeAxes = Axes.Both, Children = new[] diff --git a/osu.Game/Screens/Menu/Disclaimer.cs b/osu.Game/Screens/Menu/Disclaimer.cs index 3f345ddfb2..71569b1abf 100644 --- a/osu.Game/Screens/Menu/Disclaimer.cs +++ b/osu.Game/Screens/Menu/Disclaimer.cs @@ -27,12 +27,13 @@ namespace osu.Game.Screens.Menu Children = new Drawable[] { - new FlowContainer + new FillFlowContainer { AutoSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre, - FlowStrategy = FlowStrategies.CreateVerticalFlow(new Vector2(0, 2)), + Direction = FlowDirection.Down, + Spacing = new Vector2(0, 2), Children = new Drawable[] { icon = new TextAwesome diff --git a/osu.Game/Screens/Menu/FlowContainerWithOrigin.cs b/osu.Game/Screens/Menu/FlowContainerWithOrigin.cs index f8b92dc795..d0972ea84b 100644 --- a/osu.Game/Screens/Menu/FlowContainerWithOrigin.cs +++ b/osu.Game/Screens/Menu/FlowContainerWithOrigin.cs @@ -12,7 +12,7 @@ namespace osu.Game.Screens.Menu /// /// A flow container with an origin based on one of its contained drawables. /// - public class FlowContainerWithOrigin : FlowContainer + public class FlowContainerWithOrigin : FillFlowContainer { /// /// A target drawable which this flowcontainer should be centered around. @@ -22,7 +22,7 @@ namespace osu.Game.Screens.Menu protected override IComparer DepthComparer => new ReverseCreationOrderDepthComparer(); - protected override IEnumerable SortedChildren => base.SortedChildren.Reverse(); + protected override IEnumerable FlowingChildren => base.FlowingChildren.Reverse(); public override Anchor Origin => Anchor.Custom; diff --git a/osu.Game/Screens/Play/KeyCounterCollection.cs b/osu.Game/Screens/Play/KeyCounterCollection.cs index 8772d7d7e4..a31c5a9d4d 100644 --- a/osu.Game/Screens/Play/KeyCounterCollection.cs +++ b/osu.Game/Screens/Play/KeyCounterCollection.cs @@ -8,11 +8,11 @@ using OpenTK.Graphics; namespace osu.Game.Screens.Play { - public class KeyCounterCollection : FlowContainer + public class KeyCounterCollection : FillFlowContainer { public KeyCounterCollection() { - FlowStrategy = FlowStrategies.CreateHorizontalFlow(); + Direction = FlowDirection.Right; AutoSizeAxes = Axes.Both; } diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index 2bb684ae29..bf879fc0dd 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -131,12 +131,12 @@ namespace osu.Game.Screens.Play AutoSizeAxes = Axes.Both; Children = new Drawable[] { - new FlowContainer() + new FillFlowContainer() { AutoSizeAxes = Axes.Both, Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, Children = new Drawable[] { new OsuSpriteText diff --git a/osu.Game/Screens/Ranking/Results.cs b/osu.Game/Screens/Ranking/Results.cs index 4958cbc8e2..8e6f113185 100644 --- a/osu.Game/Screens/Ranking/Results.cs +++ b/osu.Game/Screens/Ranking/Results.cs @@ -65,10 +65,10 @@ namespace osu.Game.Screens.Ranking Children = new Drawable[] { - new FlowContainer + new FillFlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, Children = new Drawable[] { new OsuSpriteText diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 4a1df44de4..5f2bd15e16 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -121,11 +121,11 @@ namespace osu.Game.Screens.Select }, }, // Text for beatmap info - new FlowContainer + new FillFlowContainer { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, Margin = new MarginPadding { Top = 10, Left = 25, Right = 10, Bottom = 20 }, AutoSizeAxes = Axes.Both, Children = new Drawable[] @@ -144,10 +144,10 @@ namespace osu.Game.Screens.Select TextSize = 17, Shadow = true, }, - new FlowContainer + new FillFlowContainer { Margin = new MarginPadding { Top = 10 }, - FlowStrategy = FlowStrategies.CreateHorizontalFlow(), + Direction = FlowDirection.Right, AutoSizeAxes = Axes.Both, Children = new [] { @@ -167,10 +167,10 @@ namespace osu.Game.Screens.Select }, } }, - new FlowContainer + new FillFlowContainer { Margin = new MarginPadding { Top = 20 }, - FlowStrategy = FlowStrategies.CreateFillFlow(new Vector2(40, 0)), + Spacing = new Vector2(40, 0), AutoSizeAxes = Axes.Both, Children = labels }, diff --git a/osu.Game/Screens/Select/FilterControl.cs b/osu.Game/Screens/Select/FilterControl.cs index 98eb0e43c0..f45016c5c9 100644 --- a/osu.Game/Screens/Select/FilterControl.cs +++ b/osu.Game/Screens/Select/FilterControl.cs @@ -36,7 +36,7 @@ namespace osu.Game.Screens.Select Alpha = 0.8f, RelativeSizeAxes = Axes.Both, }, - new FlowContainer + new FillFlowContainer { Padding = new MarginPadding(20), AutoSizeAxes = Axes.Y, @@ -44,7 +44,7 @@ namespace osu.Game.Screens.Select Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Width = 0.4f, // TODO: InnerWidth property or something - FlowStrategy = FlowStrategies.CreateVerticalFlow(), + Direction = FlowDirection.Down, Children = new Drawable[] { searchTextBox = new SearchTextBox { @@ -174,10 +174,11 @@ namespace osu.Game.Screens.Select Origin = Anchor.BottomLeft, Anchor = Anchor.BottomLeft, }, - new FlowContainer + new FillFlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(10, 0)), + Direction = FlowDirection.Right, + Spacing = new Vector2(10, 0), Children = new Drawable[] { new TabItem @@ -205,10 +206,11 @@ namespace osu.Game.Screens.Select } } }, - new FlowContainer + new FillFlowContainer { AutoSizeAxes = Axes.Both, - FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(10, 0)), + Direction = FlowDirection.Right, + Spacing = new Vector2(10, 0), Origin = Anchor.TopRight, Anchor = Anchor.TopRight, Children = new Drawable[] diff --git a/osu.Game/Screens/Select/Footer.cs b/osu.Game/Screens/Select/Footer.cs index 23935b0f40..8a10f5455a 100644 --- a/osu.Game/Screens/Select/Footer.cs +++ b/osu.Game/Screens/Select/Footer.cs @@ -30,7 +30,7 @@ namespace osu.Game.Screens.Select public Action OnBack; public Action OnStart; - private FlowContainer buttons; + private FillFlowContainer buttons; public OsuLogo StartButton; @@ -91,20 +91,21 @@ namespace osu.Game.Screens.Select Origin = Anchor.BottomLeft, Action = () => OnBack?.Invoke(), }, - new FlowContainer + new FillFlowContainer { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Position = new Vector2(BackButton.SIZE_EXTENDED.X + padding, 0), RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, - FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(padding, 0)), + Direction = FlowDirection.Right, + Spacing = new Vector2(padding, 0), Children = new Drawable[] { - - buttons = new FlowContainer + buttons = new FillFlowContainer { - FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(0.2f, 0)), + Direction = FlowDirection.Right, + Spacing = new Vector2(0.2f, 0), AutoSizeAxes = Axes.Both, } } From 4d2869647905384b8910e4b84290c20fc7c77691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 1 Mar 2017 20:15:38 +0100 Subject: [PATCH 21/23] FlowDirection -> FillDirection --- osu-framework | 2 +- osu.Desktop/Overlays/VersionManager.cs | 4 ++-- osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs | 2 +- osu.Game/Beatmaps/Drawables/BeatmapPanel.cs | 6 +++--- osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs | 4 ++-- osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs | 2 +- osu.Game/Graphics/UserInterface/StarCounter.cs | 2 +- osu.Game/Online/Chat/Drawables/DrawableChannel.cs | 2 +- osu.Game/Overlays/NotificationManager.cs | 2 +- osu.Game/Overlays/Notifications/NotificationSection.cs | 2 +- osu.Game/Overlays/Options/OptionDropDown.cs | 2 +- osu.Game/Overlays/Options/OptionsSection.cs | 2 +- osu.Game/Overlays/Options/OptionsSubsection.cs | 4 ++-- osu.Game/Overlays/Options/Sections/General/LoginOptions.cs | 2 +- osu.Game/Overlays/Options/Sidebar.cs | 2 +- osu.Game/Overlays/OptionsOverlay.cs | 4 ++-- osu.Game/Overlays/Pause/PauseOverlay.cs | 4 ++-- osu.Game/Overlays/Toolbar/Toolbar.cs | 4 ++-- osu.Game/Overlays/Toolbar/ToolbarButton.cs | 4 ++-- osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs | 2 +- osu.Game/Screens/GameScreenWhiteBox.cs | 2 +- osu.Game/Screens/Menu/ButtonSystem.cs | 2 +- osu.Game/Screens/Menu/Disclaimer.cs | 2 +- osu.Game/Screens/Play/KeyCounterCollection.cs | 2 +- osu.Game/Screens/Play/PlayerLoader.cs | 2 +- osu.Game/Screens/Ranking/Results.cs | 2 +- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 4 ++-- osu.Game/Screens/Select/FilterControl.cs | 6 +++--- osu.Game/Screens/Select/Footer.cs | 4 ++-- 29 files changed, 42 insertions(+), 42 deletions(-) diff --git a/osu-framework b/osu-framework index f3aea04b0e..344593a63b 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit f3aea04b0e6a6ebb6d6f24fcb2134058765c0df0 +Subproject commit 344593a63b2def4d1b9de5940e463a6ea9771b34 diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Desktop/Overlays/VersionManager.cs index 92c4e25136..aff8bb0d7b 100644 --- a/osu.Desktop/Overlays/VersionManager.cs +++ b/osu.Desktop/Overlays/VersionManager.cs @@ -60,13 +60,13 @@ namespace osu.Desktop.Overlays new FillFlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Children = new Drawable[] { new FillFlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirection.Right, + Direction = FillDirection.Right, Spacing = new Vector2(5), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, diff --git a/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs b/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs index 9a0a532739..95bc0954de 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs @@ -25,7 +25,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables AutoSizeAxes = Axes.Both; Origin = Anchor.Centre; - Direction = FlowDirection.Down; + Direction = FillDirection.Down; Spacing = new Vector2(0, 2); Position = (h?.StackedEndPosition ?? Vector2.Zero) + judgement.PositionOffset; diff --git a/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs b/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs index 24808ed1dd..1db339a5b6 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs @@ -86,7 +86,7 @@ namespace osu.Game.Beatmaps.Drawables new FillFlowContainer { Padding = new MarginPadding(5), - Direction = FlowDirection.Right, + Direction = FillDirection.Right, AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, @@ -101,13 +101,13 @@ namespace osu.Game.Beatmaps.Drawables new FillFlowContainer { Padding = new MarginPadding { Left = 5 }, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, AutoSizeAxes = Axes.Both, Children = new Drawable[] { new FillFlowContainer { - Direction = FlowDirection.Right, + Direction = FillDirection.Right, Spacing = new Vector2(4, 0), AutoSizeAxes = Axes.Both, Children = new[] diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index 4dbee876d0..36cbebf8de 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -38,7 +38,7 @@ namespace osu.Game.Beatmaps.Drawables }, new FillFlowContainer { - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 }, AutoSizeAxes = Axes.Both, Children = new[] @@ -112,7 +112,7 @@ namespace osu.Game.Beatmaps.Drawables new FillFlowContainer { Depth = -1, - Direction = FlowDirection.Right, + Direction = FillDirection.Right, RelativeSizeAxes = Axes.Both, // This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle Shear = new Vector2(0.8f, 0), diff --git a/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs b/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs index 88179be7a3..d654299279 100644 --- a/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs +++ b/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs @@ -21,7 +21,7 @@ namespace osu.Game.Graphics.UserInterface { new FillFlowContainer { - Direction = FlowDirection.Right, + Direction = FillDirection.Right, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] diff --git a/osu.Game/Graphics/UserInterface/StarCounter.cs b/osu.Game/Graphics/UserInterface/StarCounter.cs index c1f87325ab..10ffcffa7f 100644 --- a/osu.Game/Graphics/UserInterface/StarCounter.cs +++ b/osu.Game/Graphics/UserInterface/StarCounter.cs @@ -71,7 +71,7 @@ namespace osu.Game.Graphics.UserInterface stars = new FillFlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirection.Right, + Direction = FillDirection.Right, Spacing = new Vector2(star_spacing), } }; diff --git a/osu.Game/Online/Chat/Drawables/DrawableChannel.cs b/osu.Game/Online/Chat/Drawables/DrawableChannel.cs index ee8f6edd28..b8eb1e466a 100644 --- a/osu.Game/Online/Chat/Drawables/DrawableChannel.cs +++ b/osu.Game/Online/Chat/Drawables/DrawableChannel.cs @@ -41,7 +41,7 @@ namespace osu.Game.Online.Chat.Drawables { flow = new FillFlowContainer { - Direction = FlowDirection.Down, + Direction = FillDirection.Down, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Left = 20, Right = 20 } diff --git a/osu.Game/Overlays/NotificationManager.cs b/osu.Game/Overlays/NotificationManager.cs index 3e36113617..5c666da8ae 100644 --- a/osu.Game/Overlays/NotificationManager.cs +++ b/osu.Game/Overlays/NotificationManager.cs @@ -46,7 +46,7 @@ namespace osu.Game.Overlays { sections = new FillFlowContainer { - Direction = FlowDirection.Down, + Direction = FillDirection.Down, AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, Children = new [] diff --git a/osu.Game/Overlays/Notifications/NotificationSection.cs b/osu.Game/Overlays/Notifications/NotificationSection.cs index 7d95700431..91c89d41be 100644 --- a/osu.Game/Overlays/Notifications/NotificationSection.cs +++ b/osu.Game/Overlays/Notifications/NotificationSection.cs @@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Notifications { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - Direction = FlowDirection.Down; + Direction = FillDirection.Down; Padding = new MarginPadding { diff --git a/osu.Game/Overlays/Options/OptionDropDown.cs b/osu.Game/Overlays/Options/OptionDropDown.cs index 7c4b82e198..7e2cab2a61 100644 --- a/osu.Game/Overlays/Options/OptionDropDown.cs +++ b/osu.Game/Overlays/Options/OptionDropDown.cs @@ -89,7 +89,7 @@ namespace osu.Game.Overlays.Options { Items = new KeyValuePair[0]; - Direction = FlowDirection.Down; + Direction = FillDirection.Down; RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Children = new Drawable[] diff --git a/osu.Game/Overlays/Options/OptionsSection.cs b/osu.Game/Overlays/Options/OptionsSection.cs index 1775744b26..f87e69e307 100644 --- a/osu.Game/Overlays/Options/OptionsSection.cs +++ b/osu.Game/Overlays/Options/OptionsSection.cs @@ -61,7 +61,7 @@ namespace osu.Game.Overlays.Options FlowContent = new FillFlowContainer { Margin = new MarginPadding { Top = header_size + header_margin }, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Spacing = new Vector2(0, 30), AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, diff --git a/osu.Game/Overlays/Options/OptionsSubsection.cs b/osu.Game/Overlays/Options/OptionsSubsection.cs index 04b0114b22..ef10e15abf 100644 --- a/osu.Game/Overlays/Options/OptionsSubsection.cs +++ b/osu.Game/Overlays/Options/OptionsSubsection.cs @@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Options { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - Direction = FlowDirection.Down; + Direction = FillDirection.Down; AddInternal(new Drawable[] { new OsuSpriteText @@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Options }, content = new FillFlowContainer { - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Spacing = new Vector2(0, 5), RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, diff --git a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs index b6f5d0ea68..b06644facd 100644 --- a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs @@ -100,7 +100,7 @@ namespace osu.Game.Overlays.Options.Sections.General private void load(APIAccess api, OsuConfigManager config) { this.api = api; - Direction = FlowDirection.Down; + Direction = FillDirection.Down; Spacing = new Vector2(0, 5); AutoSizeAxes = Axes.Y; RelativeSizeAxes = Axes.X; diff --git a/osu.Game/Overlays/Options/Sidebar.cs b/osu.Game/Overlays/Options/Sidebar.cs index fc47ea35be..5a1128749c 100644 --- a/osu.Game/Overlays/Options/Sidebar.cs +++ b/osu.Game/Overlays/Options/Sidebar.cs @@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Options Anchor = Anchor.CentreLeft, AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, } } }, diff --git a/osu.Game/Overlays/OptionsOverlay.cs b/osu.Game/Overlays/OptionsOverlay.cs index e88535915f..968914c6c0 100644 --- a/osu.Game/Overlays/OptionsOverlay.cs +++ b/osu.Game/Overlays/OptionsOverlay.cs @@ -77,7 +77,7 @@ namespace osu.Game.Overlays { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Children = new Drawable[] { @@ -98,7 +98,7 @@ namespace osu.Game.Overlays { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Children = sections, } } diff --git a/osu.Game/Overlays/Pause/PauseOverlay.cs b/osu.Game/Overlays/Pause/PauseOverlay.cs index a39a8d49d6..a392c1dc3e 100644 --- a/osu.Game/Overlays/Pause/PauseOverlay.cs +++ b/osu.Game/Overlays/Pause/PauseOverlay.cs @@ -104,7 +104,7 @@ namespace osu.Game.Overlays.Pause { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Spacing = new Vector2(0, 50), Origin = Anchor.Centre, Anchor = Anchor.Centre, @@ -113,7 +113,7 @@ namespace osu.Game.Overlays.Pause new FillFlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Spacing = new Vector2(0, 20), Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, diff --git a/osu.Game/Overlays/Toolbar/Toolbar.cs b/osu.Game/Overlays/Toolbar/Toolbar.cs index afb30b31c0..74cfc10e75 100644 --- a/osu.Game/Overlays/Toolbar/Toolbar.cs +++ b/osu.Game/Overlays/Toolbar/Toolbar.cs @@ -43,7 +43,7 @@ namespace osu.Game.Overlays.Toolbar new ToolbarBackground(), new FillFlowContainer { - Direction = FlowDirection.Right, + Direction = FillDirection.Right, RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] @@ -63,7 +63,7 @@ namespace osu.Game.Overlays.Toolbar { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, - Direction = FlowDirection.Right, + Direction = FillDirection.Right, RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] diff --git a/osu.Game/Overlays/Toolbar/ToolbarButton.cs b/osu.Game/Overlays/Toolbar/ToolbarButton.cs index 7d1438dd1d..0e8165283e 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarButton.cs @@ -84,7 +84,7 @@ namespace osu.Game.Overlays.Toolbar }, Flow = new FillFlowContainer { - Direction = FlowDirection.Right, + Direction = FillDirection.Right, Spacing = new Vector2(5), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, @@ -107,7 +107,7 @@ namespace osu.Game.Overlays.Toolbar }, tooltipContainer = new FillFlowContainer { - Direction = FlowDirection.Down, + Direction = FillDirection.Down, RelativeSizeAxes = Axes.Both, //stops us being considered in parent's autosize Anchor = (TooltipAnchor & Anchor.x0) > 0 ? Anchor.BottomLeft : Anchor.BottomRight, Origin = TooltipAnchor, diff --git a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs index 94f62ce54d..31b8500155 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs @@ -36,7 +36,7 @@ namespace osu.Game.Overlays.Toolbar { RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, - Direction = FlowDirection.Right, + Direction = FillDirection.Right, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Padding = new MarginPadding { Left = padding, Right = padding }, diff --git a/osu.Game/Screens/GameScreenWhiteBox.cs b/osu.Game/Screens/GameScreenWhiteBox.cs index 5d486d9e4c..623b411e35 100644 --- a/osu.Game/Screens/GameScreenWhiteBox.cs +++ b/osu.Game/Screens/GameScreenWhiteBox.cs @@ -126,7 +126,7 @@ namespace osu.Game.Screens }, childModeButtons = new FillFlowContainer { - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, RelativeSizeAxes = Axes.Both, diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index 0f8ac6c31a..f26fded19d 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -78,7 +78,7 @@ namespace osu.Game.Screens.Menu }, buttonFlow = new FlowContainerWithOrigin { - Direction = FlowDirection.Right, + Direction = FillDirection.Right, Spacing = new Vector2(-WEDGE_WIDTH, 0), Anchor = Anchor.Centre, AutoSizeAxes = Axes.Both, diff --git a/osu.Game/Screens/Menu/Disclaimer.cs b/osu.Game/Screens/Menu/Disclaimer.cs index 71569b1abf..deb9a4dbf8 100644 --- a/osu.Game/Screens/Menu/Disclaimer.cs +++ b/osu.Game/Screens/Menu/Disclaimer.cs @@ -32,7 +32,7 @@ namespace osu.Game.Screens.Menu AutoSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Spacing = new Vector2(0, 2), Children = new Drawable[] { diff --git a/osu.Game/Screens/Play/KeyCounterCollection.cs b/osu.Game/Screens/Play/KeyCounterCollection.cs index a31c5a9d4d..0a93032a20 100644 --- a/osu.Game/Screens/Play/KeyCounterCollection.cs +++ b/osu.Game/Screens/Play/KeyCounterCollection.cs @@ -12,7 +12,7 @@ namespace osu.Game.Screens.Play { public KeyCounterCollection() { - Direction = FlowDirection.Right; + Direction = FillDirection.Right; AutoSizeAxes = Axes.Both; } diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index bf879fc0dd..bc04dbb2f7 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -136,7 +136,7 @@ namespace osu.Game.Screens.Play AutoSizeAxes = Axes.Both, Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Children = new Drawable[] { new OsuSpriteText diff --git a/osu.Game/Screens/Ranking/Results.cs b/osu.Game/Screens/Ranking/Results.cs index 8e6f113185..1c8972e4be 100644 --- a/osu.Game/Screens/Ranking/Results.cs +++ b/osu.Game/Screens/Ranking/Results.cs @@ -68,7 +68,7 @@ namespace osu.Game.Screens.Ranking new FillFlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Children = new Drawable[] { new OsuSpriteText diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 5f2bd15e16..a3493971cb 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -125,7 +125,7 @@ namespace osu.Game.Screens.Select { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Margin = new MarginPadding { Top = 10, Left = 25, Right = 10, Bottom = 20 }, AutoSizeAxes = Axes.Both, Children = new Drawable[] @@ -147,7 +147,7 @@ namespace osu.Game.Screens.Select new FillFlowContainer { Margin = new MarginPadding { Top = 10 }, - Direction = FlowDirection.Right, + Direction = FillDirection.Right, AutoSizeAxes = Axes.Both, Children = new [] { diff --git a/osu.Game/Screens/Select/FilterControl.cs b/osu.Game/Screens/Select/FilterControl.cs index f45016c5c9..357346bc65 100644 --- a/osu.Game/Screens/Select/FilterControl.cs +++ b/osu.Game/Screens/Select/FilterControl.cs @@ -44,7 +44,7 @@ namespace osu.Game.Screens.Select Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Width = 0.4f, // TODO: InnerWidth property or something - Direction = FlowDirection.Down, + Direction = FillDirection.Down, Children = new Drawable[] { searchTextBox = new SearchTextBox { @@ -177,7 +177,7 @@ namespace osu.Game.Screens.Select new FillFlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirection.Right, + Direction = FillDirection.Right, Spacing = new Vector2(10, 0), Children = new Drawable[] { @@ -209,7 +209,7 @@ namespace osu.Game.Screens.Select new FillFlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirection.Right, + Direction = FillDirection.Right, Spacing = new Vector2(10, 0), Origin = Anchor.TopRight, Anchor = Anchor.TopRight, diff --git a/osu.Game/Screens/Select/Footer.cs b/osu.Game/Screens/Select/Footer.cs index 8a10f5455a..2b62e8d452 100644 --- a/osu.Game/Screens/Select/Footer.cs +++ b/osu.Game/Screens/Select/Footer.cs @@ -98,13 +98,13 @@ namespace osu.Game.Screens.Select Position = new Vector2(BackButton.SIZE_EXTENDED.X + padding, 0), RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, - Direction = FlowDirection.Right, + Direction = FillDirection.Right, Spacing = new Vector2(padding, 0), Children = new Drawable[] { buttons = new FillFlowContainer { - Direction = FlowDirection.Right, + Direction = FillDirection.Right, Spacing = new Vector2(0.2f, 0), AutoSizeAxes = Axes.Both, } From 0bd3138887352f9d399ea7f16fed0a7c851438b7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 2 Mar 2017 16:27:49 +0900 Subject: [PATCH 22/23] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 344593a63b..0b11b8b1ed 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 344593a63b2def4d1b9de5940e463a6ea9771b34 +Subproject commit 0b11b8b1ed740ab74371cf178b5d956ac7bc1547 From c4ca18eeba6eedca47d5a60d68df462e2a339cd8 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 2 Mar 2017 16:28:51 +0900 Subject: [PATCH 23/23] Remove references to PassThrough. --- osu.Game/Screens/Play/Player.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 46f93900fc..0a094d2050 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -152,7 +152,6 @@ namespace osu.Game.Screens.Play playerInputManager = new PlayerInputManager(game.Host) { Clock = new InterpolatingFramedClock(sourceClock), - PassThrough = false, Children = new Drawable[] { hitRenderer, @@ -196,7 +195,6 @@ namespace osu.Game.Screens.Play if (canPause || force) { lastPauseActionTime = Time.Current; - playerInputManager.PassThrough = true; scoreOverlay.KeyCounter.IsCounting = false; pauseOverlay.Retries = RestartCount; pauseOverlay.Show(); @@ -212,7 +210,6 @@ namespace osu.Game.Screens.Play public void Resume() { lastPauseActionTime = Time.Current; - playerInputManager.PassThrough = false; scoreOverlay.KeyCounter.IsCounting = true; pauseOverlay.Hide(); sourceClock.Start();