1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

No need to sort list any more

This commit is contained in:
Dean Herbert 2018-04-05 21:03:39 +09:00
parent 1a6dfcbc1c
commit 345cfb077d
2 changed files with 4 additions and 4 deletions

View File

@ -90,7 +90,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
return Compare(xMask, yMask);
}
public static int Compare(HitObjectMask x, HitObjectMask y)
public int Compare(HitObjectMask x, HitObjectMask y)
{
// Put earlier hitobjects towards the end of the list, so they handle input first
int i = y.HitObject.HitObject.StartTime.CompareTo(x.HitObject.HitObject.StartTime);

View File

@ -2,13 +2,13 @@
// 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.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input;
using osu.Framework.Lists;
using osu.Game.Graphics;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Edit.Types;
@ -23,13 +23,13 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
{
public const float BORDER_RADIUS = 2;
private readonly SortedList<HitObjectMask> selectedMasks;
private readonly List<HitObjectMask> selectedMasks;
private Drawable outline;
public MaskSelection()
{
selectedMasks = new SortedList<HitObjectMask>(MaskContainer.Compare);
selectedMasks = new List<HitObjectMask>();
RelativeSizeAxes = Axes.Both;
AlwaysPresent = true;