diff --git a/osu-framework b/osu-framework index eae237f6a7..4d7f9b8a3a 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit eae237f6a7e2a6e7d7c621b2382bb08de2b470b8 +Subproject commit 4d7f9b8a3afd32183a31d62143d522d43d8c01ca diff --git a/osu.Desktop.VisualTests/Tests/TestCaseChatDisplay.cs b/osu.Desktop.VisualTests/Tests/TestCaseChatDisplay.cs index 0e83010caf..54f3957014 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseChatDisplay.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseChatDisplay.cs @@ -71,7 +71,7 @@ namespace osu.Desktop.VisualTests.Tests Add(flow = new FlowContainer { RelativeSizeAxes = Axes.Both, - Direction = FlowDirection.VerticalOnly + Direction = FlowDirections.Vertical }); SpriteText loading; diff --git a/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs b/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs index 96360a6291..1a92436d74 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs @@ -24,7 +24,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables AutoSizeAxes = Axes.Both; Origin = Anchor.Centre; - Direction = FlowDirection.VerticalOnly; + Direction = FlowDirections.Vertical; 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 1ee9e3e4c2..a6ad0a6457 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapPanel.cs @@ -77,7 +77,7 @@ namespace osu.Game.Beatmaps.Drawables new FlowContainer { Padding = new MarginPadding(5), - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, @@ -93,13 +93,13 @@ namespace osu.Game.Beatmaps.Drawables { Padding = new MarginPadding { Left = 5 }, Spacing = new Vector2(0, 5), - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, AutoSizeAxes = Axes.Both, Children = new Drawable[] { new FlowContainer { - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, AutoSizeAxes = Axes.Both, Spacing = new Vector2(4, 0), Children = new[] diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index 3b79d1bf1d..a0a7549caf 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -39,7 +39,7 @@ namespace osu.Game.Beatmaps.Drawables }, new FlowContainer { - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 }, AutoSizeAxes = Axes.Both, Children = new[] @@ -113,7 +113,7 @@ namespace osu.Game.Beatmaps.Drawables new FlowContainer { Depth = -1, - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, 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 1b51177c09..bbc8bd3e47 100644 --- a/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs +++ b/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs @@ -22,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface { new FlowContainer { - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] diff --git a/osu.Game/Online/Chat/Drawables/ChannelDisplay.cs b/osu.Game/Online/Chat/Drawables/ChannelDisplay.cs index 131dc50699..08630a25aa 100644 --- a/osu.Game/Online/Chat/Drawables/ChannelDisplay.cs +++ b/osu.Game/Online/Chat/Drawables/ChannelDisplay.cs @@ -42,7 +42,7 @@ namespace osu.Game.Online.Chat.Drawables { flow = new FlowContainer { - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Spacing = new Vector2(1, 1) diff --git a/osu.Game/Overlays/NotificationManager.cs b/osu.Game/Overlays/NotificationManager.cs index ecfa3daa38..cb2025c576 100644 --- a/osu.Game/Overlays/NotificationManager.cs +++ b/osu.Game/Overlays/NotificationManager.cs @@ -45,7 +45,7 @@ namespace osu.Game.Overlays { sections = new FlowContainer { - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, 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 ec286302b8..0f74df18de 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.VerticalOnly; + Direction = FlowDirections.Vertical; Padding = new MarginPadding { diff --git a/osu.Game/Overlays/Options/OptionDropDown.cs b/osu.Game/Overlays/Options/OptionDropDown.cs index b9d676109e..ff1e6ae103 100644 --- a/osu.Game/Overlays/Options/OptionDropDown.cs +++ b/osu.Game/Overlays/Options/OptionDropDown.cs @@ -86,7 +86,7 @@ namespace osu.Game.Overlays.Options { Items = new KeyValuePair[0]; - Direction = FlowDirection.VerticalOnly; + Direction = FlowDirections.Vertical; 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 e90da5f047..6a41cb9612 100644 --- a/osu.Game/Overlays/Options/OptionSlider.cs +++ b/osu.Game/Overlays/Options/OptionSlider.cs @@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Options public OptionSlider() { - Direction = FlowDirection.VerticalOnly; + Direction = FlowDirections.Vertical; 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 a1cff0188c..61cfa868ec 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 }, - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, 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 aa17ac7e52..37cb6d01c1 100644 --- a/osu.Game/Overlays/Options/OptionsSubsection.cs +++ b/osu.Game/Overlays/Options/OptionsSubsection.cs @@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Options { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - Direction = FlowDirection.VerticalOnly; + Direction = FlowDirections.Vertical; AddInternal(new Drawable[] { new OsuSpriteText @@ -32,7 +32,7 @@ namespace osu.Game.Overlays.Options }, content = new FlowContainer { - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Spacing = new Vector2(0, 5), diff --git a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs index 08777c97a7..aca9b02f48 100644 --- a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs @@ -101,7 +101,7 @@ namespace osu.Game.Overlays.Options.Sections.General private void load(APIAccess api, OsuConfigManager config) { this.api = api; - Direction = FlowDirection.VerticalOnly; + Direction = FlowDirections.Vertical; AutoSizeAxes = Axes.Y; RelativeSizeAxes = Axes.X; Spacing = new Vector2(0, 5); diff --git a/osu.Game/Overlays/Options/Sidebar.cs b/osu.Game/Overlays/Options/Sidebar.cs index 57865b84a7..f3fe3e1683 100644 --- a/osu.Game/Overlays/Options/Sidebar.cs +++ b/osu.Game/Overlays/Options/Sidebar.cs @@ -42,7 +42,7 @@ namespace osu.Game.Overlays.Options Anchor = Anchor.CentreLeft, AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - Direction = FlowDirection.VerticalOnly + Direction = FlowDirections.Vertical } } }, diff --git a/osu.Game/Overlays/OptionsOverlay.cs b/osu.Game/Overlays/OptionsOverlay.cs index a93bbc10d3..68786b00e8 100644 --- a/osu.Game/Overlays/OptionsOverlay.cs +++ b/osu.Game/Overlays/OptionsOverlay.cs @@ -82,7 +82,7 @@ namespace osu.Game.Overlays { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, Children = new Drawable[] { @@ -103,7 +103,7 @@ namespace osu.Game.Overlays { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, Children = sections, } } @@ -141,7 +141,7 @@ namespace osu.Game.Overlays foreach (OptionsSection section in sections) { - float distance = Math.Abs(scrollContainer.GetChildYInContent(section) - currentScroll); + float distance = Math.Abs(scrollContainer.GetChildPosInContent(section) - currentScroll); if (distance < bestDistance) { bestDistance = distance; diff --git a/osu.Game/Overlays/Pause/PauseOverlay.cs b/osu.Game/Overlays/Pause/PauseOverlay.cs index 43365a610d..65eb5154a6 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.VerticalOnly, + Direction = FlowDirections.Vertical, Spacing = new Vector2(0f, 50f), Origin = Anchor.Centre, Anchor = Anchor.Centre, @@ -113,7 +113,7 @@ namespace osu.Game.Overlays.Pause new FlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, Spacing = new Vector2(0f, 20f), Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, diff --git a/osu.Game/Overlays/Toolbar/Toolbar.cs b/osu.Game/Overlays/Toolbar/Toolbar.cs index dc8b8d1e9a..7a112ae070 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 = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, 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.HorizontalOnly, + Direction = FlowDirections.Horizontal, 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 67b0039971..1b8e68151c 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 { - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Padding = new MarginPadding { Left = Toolbar.HEIGHT / 2, Right = Toolbar.HEIGHT / 2 }, @@ -107,7 +107,7 @@ namespace osu.Game.Overlays.Toolbar }, tooltipContainer = new FlowContainer { - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, 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 0ef56435e6..af543ae559 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs @@ -38,7 +38,7 @@ namespace osu.Game.Overlays.Toolbar { RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Padding = new MarginPadding { Left = 10, Right = 10 }, diff --git a/osu.Game/Screens/GameModeWhiteBox.cs b/osu.Game/Screens/GameModeWhiteBox.cs index 0cda73f225..b72a352ef9 100644 --- a/osu.Game/Screens/GameModeWhiteBox.cs +++ b/osu.Game/Screens/GameModeWhiteBox.cs @@ -126,7 +126,7 @@ namespace osu.Game.Screens }, childModeButtons = new FlowContainer { - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, 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 7e1db73205..14d957733a 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 = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, 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 6d720569df..9a84a79333 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -81,7 +81,7 @@ namespace osu.Game.Screens.Menu }, buttonFlow = new FlowContainerWithOrigin { - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, Anchor = Anchor.Centre, AutoSizeAxes = Axes.Both, Spacing = new Vector2(-WEDGE_WIDTH, 0), diff --git a/osu.Game/Screens/Play/KeyCounterCollection.cs b/osu.Game/Screens/Play/KeyCounterCollection.cs index 709f34fac4..8e7f7558d7 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.HorizontalOnly; + Direction = FlowDirections.Horizontal; AutoSizeAxes = Axes.Both; } diff --git a/osu.Game/Screens/Ranking/Results.cs b/osu.Game/Screens/Ranking/Results.cs index 363b386b42..5e61f381e9 100644 --- a/osu.Game/Screens/Ranking/Results.cs +++ b/osu.Game/Screens/Ranking/Results.cs @@ -69,7 +69,7 @@ namespace osu.Game.Screens.Ranking new FlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, Children = new Drawable[] { new OsuSpriteText diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index ebee3090c1..390d175bd4 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -127,7 +127,7 @@ namespace osu.Game.Screens.Select { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, Margin = new MarginPadding { Top = 10, Left = 25, Right = 10, Bottom = 20 }, AutoSizeAxes = Axes.Both, Children = new Drawable[] @@ -149,7 +149,7 @@ namespace osu.Game.Screens.Select new FlowContainer { Margin = new MarginPadding { Top = 10 }, - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, AutoSizeAxes = Axes.Both, Children = new [] { diff --git a/osu.Game/Screens/Select/FilterControl.cs b/osu.Game/Screens/Select/FilterControl.cs index c3f0eb9b6d..512fa22b3a 100644 --- a/osu.Game/Screens/Select/FilterControl.cs +++ b/osu.Game/Screens/Select/FilterControl.cs @@ -43,7 +43,7 @@ namespace osu.Game.Screens.Select Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Width = 0.4f, // TODO: InnerWidth property or something - Direction = FlowDirection.VerticalOnly, + Direction = FlowDirections.Vertical, Children = new Drawable[] { searchTextBox = new SearchTextBox { RelativeSizeAxes = Axes.X }, @@ -175,7 +175,7 @@ namespace osu.Game.Screens.Select new FlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, Spacing = new Vector2(10, 0), Children = new Drawable[] { @@ -207,7 +207,7 @@ namespace osu.Game.Screens.Select new FlowContainer { AutoSizeAxes = Axes.Both, - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, 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 1ef970b7f0..55fb36f144 100644 --- a/osu.Game/Screens/Select/Footer.cs +++ b/osu.Game/Screens/Select/Footer.cs @@ -94,14 +94,14 @@ namespace osu.Game.Screens.Select Position = new Vector2(BackButton.SIZE_EXTENDED.X + padding, 0), RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, Spacing = new Vector2(padding, 0), Children = new Drawable[] { buttons = new FlowContainer { - Direction = FlowDirection.HorizontalOnly, + Direction = FlowDirections.Horizontal, Spacing = new Vector2(0.2f, 0), AutoSizeAxes = Axes.Both, }