diff --git a/osu.Game.Tournament/Screens/Ladder/LadderManager.cs b/osu.Game.Tournament/Screens/Ladder/LadderManager.cs index 235ac4a86a..2cf7e00314 100644 --- a/osu.Game.Tournament/Screens/Ladder/LadderManager.cs +++ b/osu.Game.Tournament/Screens/Ladder/LadderManager.cs @@ -12,6 +12,7 @@ using osu.Framework.Input.States; using osu.Game.Graphics.UserInterface; using osu.Game.Tournament.Components; using osu.Game.Tournament.Screens.Ladder.Components; +using OpenTK; using SixLabors.Primitives; namespace osu.Game.Tournament.Screens.Ladder @@ -43,8 +44,15 @@ namespace osu.Game.Tournament.Screens.Ladder RelativeSizeAxes = Axes.Both, Children = new Drawable[] { - paths = new Container { RelativeSizeAxes = Axes.Both }, - pairingsContainer = new Container { RelativeSizeAxes = Axes.Both }, + new ScrollableContainer + { + RelativeSizeAxes = Axes.Both, + Children = new Drawable[] + { + paths = new Container { RelativeSizeAxes = Axes.Both }, + pairingsContainer = new Container { RelativeSizeAxes = Axes.Both }, + } + }, new LadderEditorSettings { Anchor = Anchor.TopRight, @@ -183,4 +191,17 @@ namespace osu.Game.Tournament.Screens.Ladder public void Remove(MatchPairing pairing) => pairingsContainer.FirstOrDefault(p => p.Pairing == pairing)?.Remove(); } + + public class ScrollableContainer : Container + { + protected override bool OnDragStart(InputState state) => true; + + public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true; + + protected override bool OnDrag(InputState state) + { + Position += state.Mouse.Delta; + return base.OnDrag(state); + } + } }