Merge branch 'master' into editor-timing-screen

This commit is contained in:
Dean Herbert
2019-10-30 18:42:20 +09:00
committed by GitHub
38 changed files with 465 additions and 224 deletions

View File

@ -3,7 +3,6 @@
using System;
using System.Linq;
using Microsoft.EntityFrameworkCore.Internal;
using osu.Framework.MathUtils;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
@ -88,7 +87,17 @@ namespace osu.Game.Screens.Edit
if (direction < 0 && timingPoint.Time == CurrentTime)
{
// When going backwards and we're at the boundary of two timing points, we compute the seek distance with the timing point which we are seeking into
int activeIndex = ControlPointInfo.TimingPoints.IndexOf(timingPoint);
int activeIndex = -1;
for (int i = 0; i < ControlPointInfo.TimingPoints.Count; i++)
{
if (ControlPointInfo.TimingPoints[i] == timingPoint)
{
activeIndex = i;
break;
}
}
while (activeIndex > 0 && CurrentTime == timingPoint.Time)
timingPoint = ControlPointInfo.TimingPoints[--activeIndex];
}

View File

@ -42,6 +42,7 @@ namespace osu.Game.Screens.Menu
public IntroSequence()
{
RelativeSizeAxes = Axes.Both;
Alpha = 0;
}
[BackgroundDependencyLoader]

View File

@ -45,8 +45,6 @@ namespace osu.Game.Screens.Play.HUD
VisualSettings = new VisualSettings { Expanded = false }
}
};
Show();
}
protected override void PopIn() => this.FadeIn(fade_duration);

View File

@ -106,6 +106,8 @@ namespace osu.Game.Screens.Play
protected override void LoadComplete()
{
base.LoadComplete();
Show();
replayLoaded.ValueChanged += loaded => AllowSeeking = loaded.NewValue;

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
namespace osu.Game.Screens.Select.Carousel
{
@ -81,12 +82,10 @@ namespace osu.Game.Screens.Select.Carousel
{
base.Filter(criteria);
var children = new List<CarouselItem>(InternalChildren);
children.ForEach(c => c.Filter(criteria));
children.Sort((x, y) => x.CompareTo(criteria, y));
InternalChildren = children;
InternalChildren.ForEach(c => c.Filter(criteria));
// IEnumerable<T>.OrderBy() is used instead of List<T>.Sort() to ensure sorting stability
var criteriaComparer = Comparer<CarouselItem>.Create((x, y) => x.CompareTo(criteria, y));
InternalChildren = InternalChildren.OrderBy(c => c, criteriaComparer).ToList();
}
protected virtual void ChildItemStateChanged(CarouselItem item, CarouselItemState value)