Merge branch 'master' into fix-repeat-arrow-interpolation

This commit is contained in:
Dan Balasescu
2018-07-31 16:21:15 +09:00
committed by GitHub
5 changed files with 21 additions and 9 deletions

View File

@ -9,9 +9,9 @@ install:
- cmd: git submodule update --init --recursive --depth=5 - cmd: git submodule update --init --recursive --depth=5
- cmd: choco install resharper-clt -y - cmd: choco install resharper-clt -y
- cmd: choco install nvika -y - cmd: choco install nvika -y
- cmd: appveyor DownloadFile https://github.com/peppy/CodeFileSanity/releases/download/v0.2.5/CodeFileSanity.exe - cmd: dotnet tool install CodeFileSanity --version 0.0.16 --global
before_build: before_build:
- cmd: CodeFileSanity.exe - cmd: CodeFileSanity
- cmd: nuget restore -verbosity quiet - cmd: nuget restore -verbosity quiet
build: build:
project: osu.sln project: osu.sln

View File

@ -120,7 +120,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
return; return;
tracking = value; tracking = value;
FollowCircle.ScaleTo(tracking ? 2.8f : 1, 300, Easing.OutQuint); FollowCircle.ScaleTo(tracking ? 2f : 1, 300, Easing.OutQuint);
FollowCircle.FadeTo(tracking ? 0.2f : 0, 300, Easing.OutQuint); FollowCircle.FadeTo(tracking ? 0.2f : 0, 300, Easing.OutQuint);
} }
} }

View File

@ -16,6 +16,9 @@ namespace osu.Game.Rulesets.Osu.Objects
{ {
base.ApplyDefaultsToSelf(controlPointInfo, difficulty); base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
// Out preempt should be one span early to give the user ample warning.
TimePreempt += SpanDuration;
// We want to show the first RepeatPoint as the TimePreempt dictates but on short (and possibly fast) sliders // We want to show the first RepeatPoint as the TimePreempt dictates but on short (and possibly fast) sliders
// we may need to cut down this time on following RepeatPoints to only show up to two RepeatPoints at any given time. // we may need to cut down this time on following RepeatPoints to only show up to two RepeatPoints at any given time.
if (RepeatIndex > 0) if (RepeatIndex > 0)

View File

@ -54,11 +54,11 @@ namespace osu.Game.Tests.Visual
breadcrumbs.Current.TriggerChange(); breadcrumbs.Current.TriggerChange();
assertCurrent(); waitForCurrent();
pushNext(); pushNext();
assertCurrent(); waitForCurrent();
pushNext(); pushNext();
assertCurrent(); waitForCurrent();
AddStep(@"make start current", () => AddStep(@"make start current", () =>
{ {
@ -66,8 +66,9 @@ namespace osu.Game.Tests.Visual
currentScreen = startScreen; currentScreen = startScreen;
}); });
assertCurrent(); waitForCurrent();
pushNext(); pushNext();
waitForCurrent();
AddAssert(@"only 2 items", () => breadcrumbs.Items.Count() == 2); AddAssert(@"only 2 items", () => breadcrumbs.Items.Count() == 2);
AddStep(@"exit current", () => changedScreen.Exit()); AddStep(@"exit current", () => changedScreen.Exit());
AddAssert(@"current screen is first", () => startScreen == changedScreen); AddAssert(@"current screen is first", () => startScreen == changedScreen);
@ -80,7 +81,7 @@ namespace osu.Game.Tests.Visual
} }
private void pushNext() => AddStep(@"push next screen", () => currentScreen = ((TestScreen)currentScreen).PushNext()); private void pushNext() => AddStep(@"push next screen", () => currentScreen = ((TestScreen)currentScreen).PushNext());
private void assertCurrent() => AddAssert(@"changedScreen correct", () => currentScreen == changedScreen); private void waitForCurrent() => AddUntilStep(() => currentScreen.IsCurrentScreen, "current screen");
private abstract class TestScreen : OsuScreen private abstract class TestScreen : OsuScreen
{ {

View File

@ -4,6 +4,8 @@
using System; using System;
using osu.Framework; using osu.Framework;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Threading; using osu.Framework.Threading;
@ -214,17 +216,21 @@ namespace osu.Game.Screens.Play
private Box background; private Box background;
private AspectContainer aspect; private AspectContainer aspect;
private SampleChannel sampleConfirm;
public Button() public Button()
{ {
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours) private void load(OsuColour colours, AudioManager audio)
{ {
colourNormal = colours.Yellow; colourNormal = colours.Yellow;
colourHover = colours.YellowDark; colourHover = colours.YellowDark;
sampleConfirm = audio.Sample.Get(@"SongSelect/confirm-selection");
Children = new Drawable[] Children = new Drawable[]
{ {
background = new Box background = new Box
@ -311,6 +317,8 @@ namespace osu.Game.Screens.Play
if (!Enabled) if (!Enabled)
return false; return false;
sampleConfirm.Play();
box.FlashColour(Color4.White, 500, Easing.OutQuint); box.FlashColour(Color4.White, 500, Easing.OutQuint);
aspect.ScaleTo(1.2f, 2000, Easing.OutQuint); aspect.ScaleTo(1.2f, 2000, Easing.OutQuint);