1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-22 15:12:54 +08:00

Merge branch 'master' into profile-overlay-graph-new

This commit is contained in:
Dean Herbert 2020-11-24 12:52:59 +09:00 committed by GitHub
commit 37ea65de2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 22 deletions

View File

@ -149,7 +149,10 @@ namespace osu.Game.Rulesets.Judgements
private void runAnimation() private void runAnimation()
{ {
// undo any transforms applies in ApplyMissAnimations/ApplyHitAnimations to get a sane initial state.
ApplyTransformsAt(double.MinValue, true);
ClearTransforms(true); ClearTransforms(true);
LifetimeStart = Result.TimeAbsolute; LifetimeStart = Result.TimeAbsolute;
using (BeginAbsoluteSequence(Result.TimeAbsolute, true)) using (BeginAbsoluteSequence(Result.TimeAbsolute, true))

View File

@ -439,6 +439,8 @@ namespace osu.Game.Rulesets.Objects.Drawables
private void clearExistingStateTransforms() private void clearExistingStateTransforms()
{ {
base.ApplyTransformsAt(double.MinValue, true); base.ApplyTransformsAt(double.MinValue, true);
// has to call this method directly (not ClearTransforms) to bypass the local ClearTransformsAfter override.
base.ClearTransformsAfter(double.MinValue, true); base.ClearTransformsAfter(double.MinValue, true);
} }

View File

@ -113,8 +113,7 @@ namespace osu.Game.Screens.Menu
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Alpha = 0.5f, Colour = Color4.DarkBlue,
AccentColour = Color4.DarkBlue,
Size = new Vector2(0.96f) Size = new Vector2(0.96f)
}, },
new Circle new Circle

View File

@ -11,7 +11,6 @@ using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Shaders; using osu.Framework.Graphics.Shaders;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using JetBrains.Annotations; using JetBrains.Annotations;
@ -20,13 +19,14 @@ using osu.Framework.Audio;
using osu.Framework.Audio.Track; using osu.Framework.Audio.Track;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Utils; using osu.Framework.Utils;
using osu.Framework.Extensions.Color4Extensions;
namespace osu.Game.Screens.Menu namespace osu.Game.Screens.Menu
{ {
/// <summary> /// <summary>
/// A visualiser that reacts to music coming from beatmaps. /// A visualiser that reacts to music coming from beatmaps.
/// </summary> /// </summary>
public class LogoVisualisation : Drawable, IHasAccentColour public class LogoVisualisation : Drawable
{ {
private readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>(); private readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
@ -67,8 +67,6 @@ namespace osu.Game.Screens.Menu
private int indexOffset; private int indexOffset;
public Color4 AccentColour { get; set; }
/// <summary> /// <summary>
/// The relative movement of bars based on input amplification. Defaults to 1. /// The relative movement of bars based on input amplification. Defaults to 1.
/// </summary> /// </summary>
@ -176,7 +174,8 @@ namespace osu.Game.Screens.Menu
// Assuming the logo is a circle, we don't need a second dimension. // Assuming the logo is a circle, we don't need a second dimension.
private float size; private float size;
private Color4 colour; private static readonly Color4 transparent_white = Color4.White.Opacity(0.2f);
private float[] audioData; private float[] audioData;
private readonly QuadBatch<TexturedVertex2D> vertexBatch = new QuadBatch<TexturedVertex2D>(100, 10); private readonly QuadBatch<TexturedVertex2D> vertexBatch = new QuadBatch<TexturedVertex2D>(100, 10);
@ -193,7 +192,6 @@ namespace osu.Game.Screens.Menu
shader = Source.shader; shader = Source.shader;
texture = Source.texture; texture = Source.texture;
size = Source.DrawSize.X; size = Source.DrawSize.X;
colour = Source.AccentColour;
audioData = Source.frequencyAmplitudes; audioData = Source.frequencyAmplitudes;
} }
@ -206,7 +204,7 @@ namespace osu.Game.Screens.Menu
Vector2 inflation = DrawInfo.MatrixInverse.ExtractScale().Xy; Vector2 inflation = DrawInfo.MatrixInverse.ExtractScale().Xy;
ColourInfo colourInfo = DrawColourInfo.Colour; ColourInfo colourInfo = DrawColourInfo.Colour;
colourInfo.ApplyChild(colour); colourInfo.ApplyChild(transparent_white);
if (audioData != null) if (audioData != null)
{ {

View File

@ -7,7 +7,6 @@ using osu.Game.Online.API;
using osu.Game.Users; using osu.Game.Users;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions;
namespace osu.Game.Screens.Menu namespace osu.Game.Screens.Menu
{ {
@ -28,12 +27,10 @@ namespace osu.Game.Screens.Menu
private void updateColour() private void updateColour()
{ {
Color4 defaultColour = Color4.White.Opacity(0.2f);
if (user.Value?.IsSupporter ?? false) if (user.Value?.IsSupporter ?? false)
AccentColour = skin.Value.GetConfig<GlobalSkinColours, Color4>(GlobalSkinColours.MenuGlow)?.Value ?? defaultColour; Colour = skin.Value.GetConfig<GlobalSkinColours, Color4>(GlobalSkinColours.MenuGlow)?.Value ?? Color4.White;
else else
AccentColour = defaultColour; Colour = Color4.White;
} }
} }
} }

View File

@ -81,6 +81,8 @@ namespace osu.Game.Screens.Menu
set => rippleContainer.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint); set => rippleContainer.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint);
} }
private const float visualizer_default_alpha = 0.5f;
private readonly Box flashLayer; private readonly Box flashLayer;
private readonly Container impactContainer; private readonly Container impactContainer;
@ -144,7 +146,7 @@ namespace osu.Game.Screens.Menu
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Alpha = 0.5f, Alpha = visualizer_default_alpha,
Size = new Vector2(0.96f) Size = new Vector2(0.96f)
}, },
new Container new Container
@ -282,8 +284,7 @@ namespace osu.Game.Screens.Menu
this.Delay(early_activation).Schedule(() => sampleBeat.Play()); this.Delay(early_activation).Schedule(() => sampleBeat.Play());
logoBeatContainer logoBeatContainer
.ScaleTo(1 - 0.02f * amplitudeAdjust, early_activation, Easing.Out) .ScaleTo(1 - 0.02f * amplitudeAdjust, early_activation, Easing.Out).Then()
.Then()
.ScaleTo(1, beatLength * 2, Easing.OutQuint); .ScaleTo(1, beatLength * 2, Easing.OutQuint);
ripple.ClearTransforms(); ripple.ClearTransforms();
@ -296,15 +297,13 @@ namespace osu.Game.Screens.Menu
{ {
flashLayer.ClearTransforms(); flashLayer.ClearTransforms();
flashLayer flashLayer
.FadeTo(0.2f * amplitudeAdjust, early_activation, Easing.Out) .FadeTo(0.2f * amplitudeAdjust, early_activation, Easing.Out).Then()
.Then()
.FadeOut(beatLength); .FadeOut(beatLength);
visualizer.ClearTransforms(); visualizer.ClearTransforms();
visualizer visualizer
.FadeTo(0.9f * amplitudeAdjust, early_activation, Easing.Out) .FadeTo(visualizer_default_alpha * 1.8f * amplitudeAdjust, early_activation, Easing.Out).Then()
.Then() .FadeTo(visualizer_default_alpha, beatLength);
.FadeTo(0.5f, beatLength);
} }
} }