diff --git a/osu.Game/Graphics/UserInterface/BarGraph.cs b/osu.Game/Graphics/UserInterface/BarGraph.cs index 80412c41e5..5ad14a92f5 100644 --- a/osu.Game/Graphics/UserInterface/BarGraph.cs +++ b/osu.Game/Graphics/UserInterface/BarGraph.cs @@ -14,6 +14,22 @@ namespace osu.Game.Graphics.UserInterface { public class BarGraph : FillFlowContainer { + private BarDirection direction = BarDirection.BottomToTop; + public new BarDirection Direction + { + get + { + return direction; + } + set + { + direction = value; + foreach (var bar in Children) + bar.Direction = direction; + base.Direction = direction == BarDirection.LeftToRight || direction == BarDirection.RightToLeft ? FillDirection.Vertical : FillDirection.Horizontal; + } + } + public IEnumerable Values { @@ -33,13 +49,12 @@ namespace osu.Game.Graphics.UserInterface RelativeSizeAxes = Axes.Both, Width = 1.0f / values.Count, Length = values[i] / values.Max(), - Direction = BarDirection.BottomToTop, + Direction = Direction, BackgroundColour = new Color4(0, 0, 0, 0), }); } } - } public class Bar : Container diff --git a/osu.Game/Screens/Select/BeatmapDetails.cs b/osu.Game/Screens/Select/BeatmapDetails.cs index 2e9d78cced..5adced7c95 100644 --- a/osu.Game/Screens/Select/BeatmapDetails.cs +++ b/osu.Game/Screens/Select/BeatmapDetails.cs @@ -305,7 +305,6 @@ namespace osu.Game.Screens.Select ratingsGraph = new BarGraph { RelativeSizeAxes = Axes.X, - Direction = FillDirection.Horizontal, Height = 50, }, },