Merge branch 'master' into fix-lead-in-issues

This commit is contained in:
Dean Herbert
2019-04-27 21:01:21 +09:00
committed by GitHub
143 changed files with 331 additions and 316 deletions

View File

@ -6,6 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces; using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces;

View File

@ -3,7 +3,7 @@
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics; using osu.Game.Graphics;
using osuTK.Graphics; using osuTK.Graphics;

View File

@ -7,6 +7,7 @@ using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Scoring;

View File

@ -5,7 +5,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Game.Rulesets.Mania.Objects.Drawables.Pieces; using osu.Game.Rulesets.Mania.Objects.Drawables.Pieces;
using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Scoring;

View File

@ -7,6 +7,7 @@ using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -4,6 +4,7 @@
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics; using osu.Game.Graphics;
using osuTK.Graphics; using osuTK.Graphics;

View File

@ -6,6 +6,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Rulesets.UI; using osu.Game.Rulesets.UI;

View File

@ -7,6 +7,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -4,6 +4,7 @@
using osuTK.Graphics; using osuTK.Graphics;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Rulesets.Mania.Objects.Drawables; using osu.Game.Rulesets.Mania.Objects.Drawables;

View File

@ -6,6 +6,7 @@ using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Skinning; using osu.Game.Skinning;

View File

@ -4,6 +4,7 @@
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;

View File

@ -4,6 +4,7 @@
using osuTK.Graphics; using osuTK.Graphics;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -5,6 +5,7 @@ using System;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;

View File

@ -43,22 +43,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
private readonly InputResampler resampler = new InputResampler(); private readonly InputResampler resampler = new InputResampler();
protected override DrawNode CreateDrawNode() => new TrailDrawNode(); protected override DrawNode CreateDrawNode() => new TrailDrawNode(this);
protected override void ApplyDrawNode(DrawNode node)
{
base.ApplyDrawNode(node);
TrailDrawNode tNode = (TrailDrawNode)node;
tNode.Shader = shader;
tNode.Texture = texture;
tNode.Size = size;
tNode.Time = time;
for (int i = 0; i < parts.Length; ++i)
if (parts[i].InvalidationID > tNode.Parts[i].InvalidationID)
tNode.Parts[i] = parts[i];
}
public CursorTrail() public CursorTrail()
{ {
@ -167,33 +152,52 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
private class TrailDrawNode : DrawNode private class TrailDrawNode : DrawNode
{ {
public IShader Shader; protected new CursorTrail Source => (CursorTrail)base.Source;
public Texture Texture;
public float Time; private IShader shader;
private Texture texture;
public readonly TrailPart[] Parts = new TrailPart[max_sprites]; private float time;
public Vector2 Size;
private readonly TrailPart[] parts = new TrailPart[max_sprites];
private Vector2 size;
private readonly VertexBuffer<TexturedTrailVertex> vertexBuffer = new QuadVertexBuffer<TexturedTrailVertex>(max_sprites, BufferUsageHint.DynamicDraw); private readonly VertexBuffer<TexturedTrailVertex> vertexBuffer = new QuadVertexBuffer<TexturedTrailVertex>(max_sprites, BufferUsageHint.DynamicDraw);
public TrailDrawNode() public TrailDrawNode(CursorTrail source)
: base(source)
{ {
for (int i = 0; i < max_sprites; i++) for (int i = 0; i < max_sprites; i++)
{ {
Parts[i].InvalidationID = 0; parts[i].InvalidationID = 0;
Parts[i].WasUpdated = false; parts[i].WasUpdated = false;
}
}
public override void ApplyState()
{
base.ApplyState();
shader = Source.shader;
texture = Source.texture;
size = Source.size;
time = Source.time;
for (int i = 0; i < Source.parts.Length; ++i)
{
if (Source.parts[i].InvalidationID > parts[i].InvalidationID)
parts[i] = Source.parts[i];
} }
} }
public override void Draw(Action<TexturedVertex2D> vertexAction) public override void Draw(Action<TexturedVertex2D> vertexAction)
{ {
Shader.GetUniform<float>("g_FadeClock").UpdateValue(ref Time); shader.GetUniform<float>("g_FadeClock").UpdateValue(ref time);
int updateStart = -1, updateEnd = 0; int updateStart = -1, updateEnd = 0;
for (int i = 0; i < Parts.Length; ++i) for (int i = 0; i < parts.Length; ++i)
{ {
if (Parts[i].WasUpdated) if (parts[i].WasUpdated)
{ {
if (updateStart == -1) if (updateStart == -1)
updateStart = i; updateStart = i;
@ -202,22 +206,22 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
int start = i * 4; int start = i * 4;
int end = start; int end = start;
Vector2 pos = Parts[i].Position; Vector2 pos = parts[i].Position;
float time = Parts[i].Time; float localTime = parts[i].Time;
Texture.DrawQuad( texture.DrawQuad(
new Quad(pos.X - Size.X / 2, pos.Y - Size.Y / 2, Size.X, Size.Y), new Quad(pos.X - size.X / 2, pos.Y - size.Y / 2, size.X, size.Y),
DrawColourInfo.Colour, DrawColourInfo.Colour,
null, null,
v => vertexBuffer.Vertices[end++] = new TexturedTrailVertex v => vertexBuffer.Vertices[end++] = new TexturedTrailVertex
{ {
Position = v.Position, Position = v.Position,
TexturePosition = v.TexturePosition, TexturePosition = v.TexturePosition,
Time = time + 1, Time = localTime + 1,
Colour = v.Colour, Colour = v.Colour,
}); });
Parts[i].WasUpdated = false; parts[i].WasUpdated = false;
} }
else if (updateStart != -1) else if (updateStart != -1)
{ {
@ -232,12 +236,12 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
base.Draw(vertexAction); base.Draw(vertexAction);
Shader.Bind(); shader.Bind();
Texture.TextureGL.Bind(); texture.TextureGL.Bind();
vertexBuffer.Draw(); vertexBuffer.Draw();
Shader.Unbind(); shader.Unbind();
} }
protected override void Dispose(bool isDisposing) protected override void Dispose(bool isDisposing)

View File

@ -6,6 +6,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Configuration; using osu.Game.Configuration;

View File

@ -9,6 +9,7 @@ using osu.Game.Graphics.Backgrounds;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Game.Beatmaps.ControlPoints; using osu.Game.Beatmaps.ControlPoints;
using osu.Framework.Audio.Track; using osu.Framework.Audio.Track;
using osu.Framework.Graphics.Effects;
namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
{ {

View File

@ -5,6 +5,7 @@ using osuTK;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;

View File

@ -6,6 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps.ControlPoints; using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -120,12 +120,8 @@ namespace osu.Game.Tests.Visual.Gameplay
} }
} }
private class SecondarySource : ISkinSource private class SecondarySource : ISkin
{ {
public event Action SourceChanged;
public void TriggerSourceChanged() => SourceChanged?.Invoke();
public Drawable GetDrawableComponent(string componentName) => new SecondarySourceBox(); public Drawable GetDrawableComponent(string componentName) => new SecondarySourceBox();
public Texture GetTexture(string componentName) => throw new NotImplementedException(); public Texture GetTexture(string componentName) => throw new NotImplementedException();
@ -135,12 +131,8 @@ namespace osu.Game.Tests.Visual.Gameplay
public TValue GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration => throw new NotImplementedException(); public TValue GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration => throw new NotImplementedException();
} }
private class SkinSourceContainer : Container, ISkinSource private class SkinSourceContainer : Container, ISkin
{ {
public event Action SourceChanged;
public void TriggerSourceChanged() => SourceChanged?.Invoke();
public Drawable GetDrawableComponent(string componentName) => new BaseSourceBox(); public Drawable GetDrawableComponent(string componentName) => new BaseSourceBox();
public Texture GetTexture(string componentName) => throw new NotImplementedException(); public Texture GetTexture(string componentName) => throw new NotImplementedException();

View File

@ -4,7 +4,7 @@
namespace osu.Game.Audio namespace osu.Game.Audio
{ {
/// <summary> /// <summary>
/// Interface for objects that can own <see cref="IPreviewTrack"/>s. /// Interface for objects that can own <see cref="PreviewTrack"/>s.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// <see cref="IPreviewTrackOwner"/>s can cancel the currently playing <see cref="PreviewTrack"/> through the /// <see cref="IPreviewTrackOwner"/>s can cancel the currently playing <see cref="PreviewTrack"/> through the

View File

@ -98,7 +98,7 @@ namespace osu.Game.Beatmaps
protected abstract IEnumerable<Type> ValidConversionTypes { get; } protected abstract IEnumerable<Type> ValidConversionTypes { get; }
/// <summary> /// <summary>
/// Creates the <see cref="Beatmap{T}"/> that will be returned by this <see cref="BeatmapProcessor{T}"/>. /// Creates the <see cref="Beatmap{T}"/> that will be returned by this <see cref="BeatmapProcessor"/>.
/// </summary> /// </summary>
protected virtual Beatmap<T> CreateBeatmap() => new Beatmap<T>(); protected virtual Beatmap<T> CreateBeatmap() => new Beatmap<T>();

View File

@ -217,7 +217,7 @@ namespace osu.Game.Beatmaps
{ {
request.Perform(api); request.Perform(api);
} }
catch (Exception e) catch
{ {
// no need to handle here as exceptions will filter down to request.Failure above. // no need to handle here as exceptions will filter down to request.Failure above.
} }
@ -382,7 +382,6 @@ namespace osu.Game.Beatmaps
/// Query the API to populate missing values like OnlineBeatmapID / OnlineBeatmapSetID or (Rank-)Status. /// Query the API to populate missing values like OnlineBeatmapID / OnlineBeatmapSetID or (Rank-)Status.
/// </summary> /// </summary>
/// <param name="beatmap">The beatmap to populate.</param> /// <param name="beatmap">The beatmap to populate.</param>
/// <param name="otherBeatmaps">The other beatmaps contained within this set.</param>
/// <param name="force">Whether to re-query if the provided beatmap already has populated values.</param> /// <param name="force">Whether to re-query if the provided beatmap already has populated values.</param>
/// <returns>True if population was successful.</returns> /// <returns>True if population was successful.</returns>
private bool fetchAndPopulateOnlineValues(BeatmapInfo beatmap, bool force = false) private bool fetchAndPopulateOnlineValues(BeatmapInfo beatmap, bool force = false)

View File

@ -12,7 +12,7 @@ namespace osu.Game.Beatmaps
{ {
/// <summary> /// <summary>
/// A <see cref="Bindable{T}"/> for the <see cref="OsuGame"/> beatmap. /// A <see cref="Bindable{T}"/> for the <see cref="OsuGame"/> beatmap.
/// This should be used sparingly in-favour of <see cref="IBindable<WorkingBeatmap>"/>. /// This should be used sparingly in-favour of <see cref="IBindable{WorkingBeatmap}"/>.
/// </summary> /// </summary>
public abstract class BindableBeatmap : NonNullableBindable<WorkingBeatmap> public abstract class BindableBeatmap : NonNullableBindable<WorkingBeatmap>
{ {
@ -67,6 +67,6 @@ namespace osu.Game.Beatmaps
/// If you are further binding to events of the retrieved <see cref="BindableBeatmap"/>, ensure a local reference is held. /// If you are further binding to events of the retrieved <see cref="BindableBeatmap"/>, ensure a local reference is held.
/// </summary> /// </summary>
[NotNull] [NotNull]
public abstract BindableBeatmap GetBoundCopy(); public new abstract BindableBeatmap GetBoundCopy();
} }
} }

View File

@ -6,6 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;

View File

@ -4,6 +4,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Framework.Audio.Track; using osu.Framework.Audio.Track;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osu.Game.Rulesets.Difficulty; using osu.Game.Rulesets.Difficulty;
@ -73,9 +74,18 @@ namespace osu.Game.Beatmaps
private class DummyBeatmapConverter : IBeatmapConverter private class DummyBeatmapConverter : IBeatmapConverter
{ {
public event Action<HitObject, IEnumerable<HitObject>> ObjectConverted; public event Action<HitObject, IEnumerable<HitObject>> ObjectConverted;
public IBeatmap Beatmap { get; set; } public IBeatmap Beatmap { get; set; }
public bool CanConvert => true; public bool CanConvert => true;
public IBeatmap Convert() => Beatmap;
public IBeatmap Convert()
{
foreach (var obj in Beatmap.HitObjects)
ObjectConverted?.Invoke(obj, obj.Yield());
return Beatmap;
}
} }
} }
} }

View File

@ -95,7 +95,7 @@ namespace osu.Game.Beatmaps.Formats
{ {
colour = new Color4(byte.Parse(split[0]), byte.Parse(split[1]), byte.Parse(split[2]), split.Length == 4 ? byte.Parse(split[3]) : (byte)255); colour = new Color4(byte.Parse(split[0]), byte.Parse(split[1]), byte.Parse(split[2]), split.Length == 4 ? byte.Parse(split[3]) : (byte)255);
} }
catch (Exception e) catch
{ {
throw new InvalidOperationException(@"Color must be specified with 8-bit integer components"); throw new InvalidOperationException(@"Color must be specified with 8-bit integer components");
} }

View File

@ -73,6 +73,7 @@ namespace osu.Game.Beatmaps
/// </para> /// </para>
/// </summary> /// </summary>
/// <param name="ruleset">The <see cref="RulesetInfo"/> to create a playable <see cref="IBeatmap"/> for.</param> /// <param name="ruleset">The <see cref="RulesetInfo"/> to create a playable <see cref="IBeatmap"/> for.</param>
/// <param name="mods">The <see cref="Mod"/>s to apply to the <see cref="IBeatmap"/>.</param>
/// <returns>The converted <see cref="IBeatmap"/>.</returns> /// <returns>The converted <see cref="IBeatmap"/>.</returns>
/// <exception cref="BeatmapInvalidForRulesetException">If <see cref="Beatmap"/> could not be converted to <paramref name="ruleset"/>.</exception> /// <exception cref="BeatmapInvalidForRulesetException">If <see cref="Beatmap"/> could not be converted to <paramref name="ruleset"/>.</exception>
public IBeatmap GetPlayableBeatmap(RulesetInfo ruleset, IReadOnlyList<Mod> mods) public IBeatmap GetPlayableBeatmap(RulesetInfo ruleset, IReadOnlyList<Mod> mods)

View File

@ -563,7 +563,7 @@ namespace osu.Game.Database
/// <summary> /// <summary>
/// Check whether an existing model already exists for a new import item. /// Check whether an existing model already exists for a new import item.
/// </summary> /// </summary>
/// <param name="model">The new model proposed for import. /// <param name="model">The new model proposed for import.</param>
/// <returns>An existing model which matches the criteria to skip importing, else null.</returns> /// <returns>An existing model which matches the criteria to skip importing, else null.</returns>
protected TModel CheckForExisting(TModel model) => model.Hash == null ? null : ModelStore.ConsumableItems.FirstOrDefault(b => b.Hash == model.Hash); protected TModel CheckForExisting(TModel model) => model.Hash == null ? null : ModelStore.ConsumableItems.FirstOrDefault(b => b.Hash == model.Hash);

View File

@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage;
@ -67,7 +66,7 @@ namespace osu.Game.Database
context = threadContexts.Value; context = threadContexts.Value;
} }
} }
catch (Exception e) catch
{ {
// retrieval of a context could trigger a fatal error. // retrieval of a context could trigger a fatal error.
Monitor.Exit(writeLock); Monitor.Exit(writeLock);

View File

@ -70,7 +70,7 @@ namespace osu.Game.Database
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
} }
catch (Exception e) catch
{ {
connection.Close(); connection.Close();
throw; throw;

View File

@ -178,64 +178,68 @@ namespace osu.Game.Graphics.Backgrounds
/// <returns>The colour.</returns> /// <returns>The colour.</returns>
protected virtual Color4 CreateTriangleShade() => Interpolation.ValueAt(RNG.NextSingle(), ColourDark, ColourLight, 0, 1); protected virtual Color4 CreateTriangleShade() => Interpolation.ValueAt(RNG.NextSingle(), ColourDark, ColourLight, 0, 1);
protected override DrawNode CreateDrawNode() => new TrianglesDrawNode(); protected override DrawNode CreateDrawNode() => new TrianglesDrawNode(this);
protected override void ApplyDrawNode(DrawNode node)
{
base.ApplyDrawNode(node);
var trianglesNode = (TrianglesDrawNode)node;
trianglesNode.Shader = shader;
trianglesNode.Texture = texture;
trianglesNode.Size = DrawSize;
trianglesNode.Parts.Clear();
trianglesNode.Parts.AddRange(parts);
}
private class TrianglesDrawNode : DrawNode private class TrianglesDrawNode : DrawNode
{ {
public IShader Shader; protected new Triangles Source => (Triangles)base.Source;
public Texture Texture;
public readonly List<TriangleParticle> Parts = new List<TriangleParticle>(); private IShader shader;
public Vector2 Size; private Texture texture;
private readonly List<TriangleParticle> parts = new List<TriangleParticle>();
private Vector2 size;
private readonly LinearBatch<TexturedVertex2D> vertexBatch = new LinearBatch<TexturedVertex2D>(100 * 3, 10, PrimitiveType.Triangles); private readonly LinearBatch<TexturedVertex2D> vertexBatch = new LinearBatch<TexturedVertex2D>(100 * 3, 10, PrimitiveType.Triangles);
public TrianglesDrawNode(Triangles source)
: base(source)
{
}
public override void ApplyState()
{
base.ApplyState();
shader = Source.shader;
texture = Source.texture;
size = Source.DrawSize;
parts.Clear();
parts.AddRange(Source.parts);
}
public override void Draw(Action<TexturedVertex2D> vertexAction) public override void Draw(Action<TexturedVertex2D> vertexAction)
{ {
base.Draw(vertexAction); base.Draw(vertexAction);
Shader.Bind(); shader.Bind();
Texture.TextureGL.Bind(); texture.TextureGL.Bind();
Vector2 localInflationAmount = edge_smoothness * DrawInfo.MatrixInverse.ExtractScale().Xy; Vector2 localInflationAmount = edge_smoothness * DrawInfo.MatrixInverse.ExtractScale().Xy;
foreach (TriangleParticle particle in Parts) foreach (TriangleParticle particle in parts)
{ {
var offset = triangle_size * new Vector2(particle.Scale * 0.5f, particle.Scale * 0.866f); var offset = triangle_size * new Vector2(particle.Scale * 0.5f, particle.Scale * 0.866f);
var size = new Vector2(2 * offset.X, offset.Y);
var triangle = new Triangle( var triangle = new Triangle(
Vector2Extensions.Transform(particle.Position * Size, DrawInfo.Matrix), Vector2Extensions.Transform(particle.Position * size, DrawInfo.Matrix),
Vector2Extensions.Transform(particle.Position * Size + offset, DrawInfo.Matrix), Vector2Extensions.Transform(particle.Position * size + offset, DrawInfo.Matrix),
Vector2Extensions.Transform(particle.Position * Size + new Vector2(-offset.X, offset.Y), DrawInfo.Matrix) Vector2Extensions.Transform(particle.Position * size + new Vector2(-offset.X, offset.Y), DrawInfo.Matrix)
); );
ColourInfo colourInfo = DrawColourInfo.Colour; ColourInfo colourInfo = DrawColourInfo.Colour;
colourInfo.ApplyChild(particle.Colour); colourInfo.ApplyChild(particle.Colour);
Texture.DrawTriangle( texture.DrawTriangle(
triangle, triangle,
colourInfo, colourInfo,
null, null,
vertexBatch.AddAction, vertexBatch.AddAction,
Vector2.Divide(localInflationAmount, size)); Vector2.Divide(localInflationAmount, new Vector2(2 * offset.X, offset.Y)));
} }
Shader.Unbind(); shader.Unbind();
} }
protected override void Dispose(bool isDisposing) protected override void Dispose(bool isDisposing)

View File

@ -4,6 +4,7 @@
using System; using System;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osuTK; using osuTK;
namespace osu.Game.Graphics.Containers namespace osu.Game.Graphics.Containers

View File

@ -103,7 +103,7 @@ namespace osu.Game.Graphics.Containers
{ {
channelManager?.OpenChannel(linkArgument); channelManager?.OpenChannel(linkArgument);
} }
catch (ChannelNotFoundException e) catch (ChannelNotFoundException)
{ {
Logger.Log($"The requested channel \"{linkArgument}\" does not exist"); Logger.Log($"The requested channel \"{linkArgument}\" does not exist");
} }

View File

@ -30,7 +30,6 @@ namespace osu.Game.Graphics.Containers
/// Assign the logo that should track the facade's position, as well as how it should transform to its initial position. /// Assign the logo that should track the facade's position, as well as how it should transform to its initial position.
/// </summary> /// </summary>
/// <param name="logo">The instance of the logo to be used for tracking.</param> /// <param name="logo">The instance of the logo to be used for tracking.</param>
/// <param name="facadeScale">The scale of the facade. Does not actually affect the logo itself.</param>
/// <param name="duration">The duration of the initial transform. Default is instant.</param> /// <param name="duration">The duration of the initial transform. Default is instant.</param>
/// <param name="easing">The easing type of the initial transform.</param> /// <param name="easing">The easing type of the initial transform.</param>
public void StartTracking(OsuLogo logo, double duration = 0, Easing easing = Easing.None) public void StartTracking(OsuLogo logo, double duration = 0, Easing easing = Easing.None)
@ -132,7 +131,7 @@ namespace osu.Game.Graphics.Containers
private class InternalFacade : Facade private class InternalFacade : Facade
{ {
public void SetSize(Vector2 size) public new void SetSize(Vector2 size)
{ {
base.SetSize(size); base.SetSize(size);
} }

View File

@ -5,6 +5,7 @@ using System;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osuTK.Graphics; using osuTK.Graphics;

View File

@ -6,8 +6,8 @@ using osuTK.Graphics;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;

View File

@ -61,9 +61,9 @@ namespace osu.Game.Graphics
/// <summary> /// <summary>
/// Retrieves the string representation of a <see cref="FontWeight"/>. /// Retrieves the string representation of a <see cref="FontWeight"/>.
/// </summary> /// </summary>
/// <param name="typeface">The <see cref="Typeface"/>.</param> /// <param name="family">The family string.</param>
/// <param name="weight">The <see cref="FontWeight"/>.</param> /// <param name="weight">The <see cref="FontWeight"/>.</param>
/// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="typeface"/>.</returns> /// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="family"/>.</returns>
public static string GetWeightString(string family, FontWeight weight) public static string GetWeightString(string family, FontWeight weight)
{ {
string weightString = weight.ToString(); string weightString = weight.ToString();
@ -81,6 +81,7 @@ namespace osu.Game.Graphics
/// <summary> /// <summary>
/// Creates a new <see cref="FontUsage"/> by applying adjustments to this <see cref="FontUsage"/>. /// Creates a new <see cref="FontUsage"/> by applying adjustments to this <see cref="FontUsage"/>.
/// </summary> /// </summary>
/// <param name="usage">The base <see cref="FontUsage"/>.</param>
/// <param name="typeface">The font typeface. If null, the value is copied from this <see cref="FontUsage"/>.</param> /// <param name="typeface">The font typeface. If null, the value is copied from this <see cref="FontUsage"/>.</param>
/// <param name="size">The text size. If null, the value is copied from this <see cref="FontUsage"/>.</param> /// <param name="size">The text size. If null, the value is copied from this <see cref="FontUsage"/>.</param>
/// <param name="weight">The font weight. If null, the value is copied from this <see cref="FontUsage"/>.</param> /// <param name="weight">The font weight. If null, the value is copied from this <see cref="FontUsage"/>.</param>

View File

@ -12,6 +12,7 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Backgrounds;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics.Effects;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;

View File

@ -8,6 +8,7 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;

View File

@ -5,7 +5,7 @@ using osuTK.Graphics;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {

View File

@ -8,7 +8,7 @@ using osu.Framework.Screens;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
/// <summary> /// <summary>
/// A <see cref="BreadcrumbControl"/> which follows the active screen (and allows navigation) in a <see cref="Screen"/> stack. /// A <see cref="BreadcrumbControl{IScreen}"/> which follows the active screen (and allows navigation) in a <see cref="Screen"/> stack.
/// </summary> /// </summary>
public class ScreenBreadcrumbControl : BreadcrumbControl<IScreen> public class ScreenBreadcrumbControl : BreadcrumbControl<IScreen>
{ {

View File

@ -12,6 +12,7 @@ using osu.Game.Graphics.Containers;
using osu.Game.Beatmaps.ControlPoints; using osu.Game.Beatmaps.ControlPoints;
using osu.Framework.Audio.Track; using osu.Framework.Audio.Track;
using System; using System;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;

View File

@ -253,7 +253,7 @@ namespace osu.Game.Online.API
handleWebException(we); handleWebException(we);
return false; return false;
} }
catch (Exception e) catch
{ {
return false; return false;
} }

View File

@ -7,7 +7,6 @@ using System.Linq;
using Newtonsoft.Json; using Newtonsoft.Json;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring.Legacy; using osu.Game.Scoring.Legacy;
using osu.Game.Users; using osu.Game.Users;
@ -71,7 +70,6 @@ namespace osu.Game.Online.API.Requests.Responses
{ {
foreach (var kvp in value) foreach (var kvp in value)
{ {
HitResult newKey;
switch (kvp.Key) switch (kvp.Key)
{ {
case @"count_geki": case @"count_geki":

View File

@ -10,16 +10,16 @@ namespace osu.Game.Online.API.Requests.Responses
public class APIUserMostPlayedBeatmap public class APIUserMostPlayedBeatmap
{ {
[JsonProperty("beatmap_id")] [JsonProperty("beatmap_id")]
public int BeatmapID; public int BeatmapID { get; set; }
[JsonProperty("count")] [JsonProperty("count")]
public int PlayCount; public int PlayCount { get; set; }
[JsonProperty] [JsonProperty]
private BeatmapInfo beatmap; private BeatmapInfo beatmap { get; set; }
[JsonProperty] [JsonProperty]
private APIBeatmapSet beatmapSet; private APIBeatmapSet beatmapSet { get; set; }
public BeatmapInfo GetBeatmapInfo(RulesetStore rulesets) public BeatmapInfo GetBeatmapInfo(RulesetStore rulesets)
{ {

View File

@ -27,8 +27,6 @@ namespace osu.Game.Online.Chat
protected ChannelManager ChannelManager; protected ChannelManager ChannelManager;
private ScrollContainer scroll;
private DrawableChannel drawableChannel; private DrawableChannel drawableChannel;
private readonly bool postingTextbox; private readonly bool postingTextbox;

View File

@ -8,6 +8,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;

View File

@ -272,7 +272,6 @@ namespace osu.Game
/// Present a score's replay immediately. /// Present a score's replay immediately.
/// The user should have already requested this interactively. /// The user should have already requested this interactively.
/// </summary> /// </summary>
/// <param name="beatmap">The beatmap to select.</param>
public void PresentScore(ScoreInfo score) public void PresentScore(ScoreInfo score)
{ {
var databasedScore = ScoreManager.GetScore(score); var databasedScore = ScoreManager.GetScore(score);

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Screens; using osu.Framework.Screens;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -11,6 +11,7 @@ using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -6,6 +6,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;

View File

@ -6,6 +6,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -6,6 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;

View File

@ -7,6 +7,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;

View File

@ -8,6 +8,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;

View File

@ -26,7 +26,7 @@ namespace osu.Game.Overlays.Chat.Tabs
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private new void load(OsuColour colour) private void load(OsuColour colour)
{ {
BackgroundInactive = colour.Gray2; BackgroundInactive = colour.Gray2;
BackgroundActive = colour.Gray3; BackgroundActive = colour.Gray3;

View File

@ -6,6 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;

View File

@ -9,7 +9,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.Chat; using osu.Game.Online.Chat;
using osu.Game.Users; using osu.Game.Users;
using osuTK; using osuTK;
@ -18,9 +17,6 @@ namespace osu.Game.Overlays.Chat.Tabs
{ {
public class PrivateChannelTabItem : ChannelTabItem public class PrivateChannelTabItem : ChannelTabItem
{ {
private readonly OsuSpriteText username;
private readonly Avatar avatarContainer;
protected override IconUsage DisplayIcon => FontAwesome.Solid.At; protected override IconUsage DisplayIcon => FontAwesome.Solid.At;
public PrivateChannelTabItem(Channel value) public PrivateChannelTabItem(Channel value)

View File

@ -6,6 +6,7 @@ using System.Linq;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;

View File

@ -8,6 +8,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;

View File

@ -11,7 +11,7 @@ namespace osu.Game.Overlays
{ {
/// <summary> /// <summary>
/// An overlay which will display a black screen that dims over a period before confirming an exit action. /// An overlay which will display a black screen that dims over a period before confirming an exit action.
/// Action is BYO (derived class will need to call <see cref="BeginConfirm"/> and <see cref="AbortConfirm"/> from a user event). /// Action is BYO (derived class will need to call <see cref="HoldToConfirmContainer.BeginConfirm"/> and <see cref="HoldToConfirmContainer.AbortConfirm"/> from a user event).
/// </summary> /// </summary>
public abstract class HoldToConfirmOverlay : HoldToConfirmContainer public abstract class HoldToConfirmOverlay : HoldToConfirmContainer
{ {

View File

@ -8,6 +8,7 @@ using osu.Framework.Extensions;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;

View File

@ -19,6 +19,7 @@ using osu.Framework.Graphics.Textures;
using osuTK.Input; using osuTK.Input;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using System; using System;
using osu.Framework.Graphics.Effects;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;

View File

@ -6,7 +6,7 @@ using osuTK.Graphics;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;

View File

@ -8,6 +8,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -10,6 +10,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
@ -50,7 +51,6 @@ namespace osu.Game.Overlays
private BeatmapManager beatmaps; private BeatmapManager beatmaps;
private List<BeatmapSetInfo> beatmapSets; private List<BeatmapSetInfo> beatmapSets;
private BeatmapSetInfo currentSet;
private Container dragContainer; private Container dragContainer;
private Container playerContainer; private Container playerContainer;

View File

@ -7,6 +7,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Game.Graphics; using osu.Game.Graphics;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;

View File

@ -14,6 +14,7 @@ using osu.Game.Graphics;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Transforms; using osu.Framework.Graphics.Transforms;
using osu.Framework.Threading; using osu.Framework.Threading;
using osu.Game.Configuration; using osu.Game.Configuration;

View File

@ -20,6 +20,7 @@ using osu.Game.Overlays.Profile.Components;
using osu.Game.Overlays.Profile.Header; using osu.Game.Overlays.Profile.Header;
using osu.Game.Users; using osu.Game.Users;
using Humanizer; using Humanizer;
using osu.Framework.Graphics.Effects;
namespace osu.Game.Overlays.Profile namespace osu.Game.Overlays.Profile
{ {

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -7,6 +7,7 @@ using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Game.Configuration;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osu.Game.Rulesets.Configuration; using osu.Game.Rulesets.Configuration;
@ -9,7 +10,7 @@ namespace osu.Game.Overlays.Settings
{ {
/// <summary> /// <summary>
/// A <see cref="SettingsSubsection"/> which provides subclasses with the <see cref="IRulesetConfigManager"/> /// A <see cref="SettingsSubsection"/> which provides subclasses with the <see cref="IRulesetConfigManager"/>
/// from the <see cref="Ruleset"/>'s <see cref="Ruleset.CreateConfig()"/>. /// from the <see cref="Ruleset"/>'s <see cref="Ruleset.CreateConfig(SettingsStore)"/>.
/// </summary> /// </summary>
public abstract class RulesetSettingsSubsection : SettingsSubsection public abstract class RulesetSettingsSubsection : SettingsSubsection
{ {

View File

@ -16,6 +16,7 @@ using System.ComponentModel;
using osu.Game.Graphics; using osu.Game.Graphics;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;

View File

@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Settings
{ {
protected override OsuDropdown<T> CreateDropdown() => new DropdownControl(); protected override OsuDropdown<T> CreateDropdown() => new DropdownControl();
protected class DropdownControl : OsuEnumDropdown<T> protected new class DropdownControl : OsuEnumDropdown<T>
{ {
public DropdownControl() public DropdownControl()
{ {

View File

@ -9,6 +9,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;

View File

@ -5,7 +5,7 @@ using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Users; using osu.Game.Users;

View File

@ -4,6 +4,7 @@
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Backgrounds;

View File

@ -1,7 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osuTK.Graphics; using osuTK.Graphics;

View File

@ -7,6 +7,7 @@ using osu.Framework.Bindables;
using osu.Framework.Caching; using osu.Framework.Caching;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osuTK; using osuTK;
using osuTK.Input; using osuTK.Input;
using osuTK.Graphics; using osuTK.Graphics;

View File

@ -4,7 +4,7 @@
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Online.API; using osu.Game.Online.API;
using osu.Game.Users; using osu.Game.Users;

View File

@ -5,7 +5,7 @@ using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics; using osu.Game.Graphics;

View File

@ -165,7 +165,7 @@ namespace osu.Game.Rulesets.Difficulty
/// <summary> /// <summary>
/// Creates the <see cref="Skill"/>s to calculate the difficulty of an <see cref="IBeatmap"/>. /// Creates the <see cref="Skill"/>s to calculate the difficulty of an <see cref="IBeatmap"/>.
/// </summary> /// </summary>
/// <param name="beatmap">The <see cref="IBeatmap"/> whose difficulty will be calculated.</param /// <param name="beatmap">The <see cref="IBeatmap"/> whose difficulty will be calculated.</param>
/// <returns>The <see cref="Skill"/>s.</returns> /// <returns>The <see cref="Skill"/>s.</returns>
protected abstract Skill[] CreateSkills(IBeatmap beatmap); protected abstract Skill[] CreateSkills(IBeatmap beatmap);
} }

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects;
using osu.Game.Screens.Edit.Compose; using osu.Game.Screens.Edit.Compose;
using osuTK; using osuTK;
@ -108,7 +109,8 @@ namespace osu.Game.Rulesets.Edit
} }
/// <summary> /// <summary>
/// Invokes <see cref="HitObject.ApplyDefaults"/>, refreshing <see cref="HitObject.NestedHitObjects"/> and parameters for the <see cref="HitObject"/>. /// Invokes <see cref="Objects.HitObject.ApplyDefaults(ControlPointInfo,BeatmapDifficulty)"/>,
/// refreshing <see cref="Objects.HitObject.NestedHitObjects"/> and parameters for the <see cref="HitObject"/>.
/// </summary> /// </summary>
protected void ApplyDefaultsToHitObject() => HitObject.ApplyDefaults(beatmap.Value.Beatmap.ControlPointInfo, beatmap.Value.Beatmap.BeatmapInfo.BaseDifficulty); protected void ApplyDefaultsToHitObject() => HitObject.ApplyDefaults(beatmap.Value.Beatmap.ControlPointInfo, beatmap.Value.Beatmap.BeatmapInfo.BaseDifficulty);

View File

@ -68,9 +68,11 @@ namespace osu.Game.Rulesets.Edit
get => state; get => state;
set set
{ {
if (state == value) return; if (state == value)
return;
state = value; state = value;
switch (state) switch (state)
{ {
case SelectionState.Selected: case SelectionState.Selected:
@ -82,6 +84,8 @@ namespace osu.Game.Rulesets.Edit
Deselected?.Invoke(this); Deselected?.Invoke(this);
break; break;
} }
StateChanged?.Invoke(state);
} }
} }

View File

@ -2,14 +2,12 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Rulesets.Objects;
namespace osu.Game.Rulesets.Mods namespace osu.Game.Rulesets.Mods
{ {
/// <summary> /// <summary>
/// Interface for a <see cref="Mod"/> that applies changes to a <see cref="BeatmapConverter{TObject}"/>. /// Interface for a <see cref="Mod"/> that applies changes to a <see cref="BeatmapConverter{TObject}"/>.
/// </summary> /// </summary>
/// <typeparam name="TObject">The type of converted <see cref="HitObject"/>.</typeparam>
public interface IApplicableToBeatmapConverter : IApplicableMod public interface IApplicableToBeatmapConverter : IApplicableMod
{ {
/// <summary> /// <summary>

View File

@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Mods
public interface IApplicableToHitObject : IApplicableMod public interface IApplicableToHitObject : IApplicableMod
{ {
/// <summary> /// <summary>
/// Applies this <see cref="IApplicableToHitObject{TObject}"/> to a <see cref="HitObject"/>. /// Applies this <see cref="IApplicableToHitObject"/> to a <see cref="HitObject"/>.
/// </summary> /// </summary>
/// <param name="hitObject">The <see cref="HitObject"/> to apply to.</param> /// <param name="hitObject">The <see cref="HitObject"/> to apply to.</param>
void ApplyToHitObject(HitObject hitObject); void ApplyToHitObject(HitObject hitObject);

View File

@ -64,24 +64,12 @@ namespace osu.Game.Rulesets.Mods
internal BindableInt Combo; internal BindableInt Combo;
private IShader shader; private IShader shader;
protected override DrawNode CreateDrawNode() => new FlashlightDrawNode(); protected override DrawNode CreateDrawNode() => new FlashlightDrawNode(this);
public override bool RemoveCompletedTransforms => false; public override bool RemoveCompletedTransforms => false;
public List<BreakPeriod> Breaks; public List<BreakPeriod> Breaks;
protected override void ApplyDrawNode(DrawNode node)
{
base.ApplyDrawNode(node);
var flashNode = (FlashlightDrawNode)node;
flashNode.Shader = shader;
flashNode.ScreenSpaceDrawQuad = ScreenSpaceDrawQuad;
flashNode.FlashlightPosition = Vector2Extensions.Transform(FlashlightPosition, DrawInfo.Matrix);
flashNode.FlashlightSize = Vector2Extensions.Transform(FlashlightSize, DrawInfo.Matrix);
}
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(ShaderManager shaderManager) private void load(ShaderManager shaderManager)
{ {
@ -136,27 +124,44 @@ namespace osu.Game.Rulesets.Mods
Invalidate(Invalidation.DrawNode); Invalidate(Invalidation.DrawNode);
} }
} }
}
private class FlashlightDrawNode : DrawNode private class FlashlightDrawNode : DrawNode
{
public IShader Shader;
public Quad ScreenSpaceDrawQuad;
public Vector2 FlashlightPosition;
public Vector2 FlashlightSize;
public override void Draw(Action<TexturedVertex2D> vertexAction)
{ {
base.Draw(vertexAction); protected new Flashlight Source => (Flashlight)base.Source;
Shader.Bind(); private IShader shader;
private Quad screenSpaceDrawQuad;
private Vector2 flashlightPosition;
private Vector2 flashlightSize;
Shader.GetUniform<Vector2>("flashlightPos").UpdateValue(ref FlashlightPosition); public FlashlightDrawNode(Flashlight source)
Shader.GetUniform<Vector2>("flashlightSize").UpdateValue(ref FlashlightSize); : base(source)
{
}
Texture.WhitePixel.DrawQuad(ScreenSpaceDrawQuad, DrawColourInfo.Colour, vertexAction: vertexAction); public override void ApplyState()
{
base.ApplyState();
Shader.Unbind(); shader = Source.shader;
screenSpaceDrawQuad = Source.ScreenSpaceDrawQuad;
flashlightPosition = Vector2Extensions.Transform(Source.FlashlightPosition, DrawInfo.Matrix);
flashlightSize = Vector2Extensions.Transform(Source.FlashlightSize, DrawInfo.Matrix);
}
public override void Draw(Action<TexturedVertex2D> vertexAction)
{
base.Draw(vertexAction);
shader.Bind();
shader.GetUniform<Vector2>("flashlightPos").UpdateValue(ref flashlightPosition);
shader.GetUniform<Vector2>("flashlightSize").UpdateValue(ref flashlightSize);
Texture.WhitePixel.DrawQuad(screenSpaceDrawQuad, DrawColourInfo.Colour, vertexAction: vertexAction);
shader.Unbind();
}
} }
} }
} }

View File

@ -7,6 +7,7 @@ using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Extensions.TypeExtensions; using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Primitives;
using osu.Game.Audio; using osu.Game.Audio;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -58,7 +59,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
public bool AllJudged => Judged && NestedHitObjects.All(h => h.AllJudged); public bool AllJudged => Judged && NestedHitObjects.All(h => h.AllJudged);
/// <summary> /// <summary>
/// Whether this <see cref="DrawableHitObject"/> has been hit. This occurs if <see cref="Result.IsHit"/> is <see cref="true"/>. /// Whether this <see cref="DrawableHitObject"/> has been hit. This occurs if <see cref="Result"/> is hit.
/// Note: This does NOT include nested hitobjects. /// Note: This does NOT include nested hitobjects.
/// </summary> /// </summary>
public bool IsHit => Result?.IsHit ?? false; public bool IsHit => Result?.IsHit ?? false;
@ -223,7 +224,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
} }
/// <summary> /// <summary>
/// Will called at least once after the <see cref="LifetimeEnd"/> of this <see cref="DrawableHitObject"/> has been passed. /// Will called at least once after the <see cref="Drawable.LifetimeEnd"/> of this <see cref="DrawableHitObject"/> has been passed.
/// </summary> /// </summary>
internal void OnLifetimeEnd() internal void OnLifetimeEnd()
{ {

View File

@ -53,8 +53,6 @@ namespace osu.Game.Rulesets.Objects
[JsonIgnore] [JsonIgnore]
public bool Kiai { get; private set; } public bool Kiai { get; private set; }
private float overallDifficulty = BeatmapDifficulty.DEFAULT_DIFFICULTY;
/// <summary> /// <summary>
/// The hit windows for this <see cref="HitObject"/>. /// The hit windows for this <see cref="HitObject"/>.
/// </summary> /// </summary>
@ -115,7 +113,7 @@ namespace osu.Game.Rulesets.Objects
/// Creates the <see cref="HitWindows"/> for this <see cref="HitObject"/>. /// Creates the <see cref="HitWindows"/> for this <see cref="HitObject"/>.
/// This can be null to indicate that the <see cref="HitObject"/> has no <see cref="HitWindows"/>. /// This can be null to indicate that the <see cref="HitObject"/> has no <see cref="HitWindows"/>.
/// <para> /// <para>
/// This will only be invoked if <see cref="HitWindows"/> hasn't been set externally (e.g. from a <see cref="BeatmapConverter"/>. /// This will only be invoked if <see cref="HitWindows"/> hasn't been set externally (e.g. from a <see cref="BeatmapConverter{T}"/>.
/// </para> /// </para>
/// </summary> /// </summary>
protected virtual HitWindows CreateHitWindows() => new HitWindows(); protected virtual HitWindows CreateHitWindows() => new HitWindows();

View File

@ -143,7 +143,7 @@ namespace osu.Game.Rulesets.Objects
/// <summary> /// <summary>
/// Given a time offset, whether the <see cref="HitObject"/> can ever be hit in the future with a non-<see cref="HitResult.Miss"/> result. /// Given a time offset, whether the <see cref="HitObject"/> can ever be hit in the future with a non-<see cref="HitResult.Miss"/> result.
/// This happens if <paramref name="timeOffset"/> is less than what is required for a <see cref="SuccessfulHitWindow"/> result. /// This happens if <paramref name="timeOffset"/> is less than what is required for <see cref="LowestSuccessfulHitResult"/>.
/// </summary> /// </summary>
/// <param name="timeOffset">The time offset.</param> /// <param name="timeOffset">The time offset.</param>
/// <returns>Whether the <see cref="HitObject"/> can be hit at any point in the future from this time offset.</returns> /// <returns>Whether the <see cref="HitObject"/> can be hit at any point in the future from this time offset.</returns>

View File

@ -277,12 +277,5 @@ namespace osu.Game.Rulesets.Objects
return ControlPoints.SequenceEqual(other.ControlPoints) && ExpectedDistance.Equals(other.ExpectedDistance) && Type == other.Type; return ControlPoints.SequenceEqual(other.ControlPoints) && ExpectedDistance.Equals(other.ExpectedDistance) && Type == other.Type;
} }
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
return obj is SliderPath other && Equals(other);
}
} }
} }

View File

@ -53,6 +53,7 @@ namespace osu.Game.Rulesets
/// Attempt to create a hit renderer for a beatmap /// Attempt to create a hit renderer for a beatmap
/// </summary> /// </summary>
/// <param name="beatmap">The beatmap to create the hit renderer for.</param> /// <param name="beatmap">The beatmap to create the hit renderer for.</param>
/// <param name="mods">The <see cref="Mod"/>s to apply.</param>
/// <exception cref="BeatmapInvalidForRulesetException">Unable to successfully load the beatmap to be usable with this ruleset.</exception> /// <exception cref="BeatmapInvalidForRulesetException">Unable to successfully load the beatmap to be usable with this ruleset.</exception>
/// <returns></returns> /// <returns></returns>
public abstract DrawableRuleset CreateDrawableRulesetWith(WorkingBeatmap beatmap, IReadOnlyList<Mod> mods); public abstract DrawableRuleset CreateDrawableRulesetWith(WorkingBeatmap beatmap, IReadOnlyList<Mod> mods);

View File

@ -154,7 +154,6 @@ namespace osu.Game.Rulesets.Scoring
/// <summary> /// <summary>
/// Notifies subscribers of <see cref="NewJudgement"/> that a new judgement has occurred. /// Notifies subscribers of <see cref="NewJudgement"/> that a new judgement has occurred.
/// </summary> /// </summary>
/// <param name="judgement">The judgement to notify subscribers of.</param>
/// <param name="result">The judgement scoring result to notify subscribers of.</param> /// <param name="result">The judgement scoring result to notify subscribers of.</param>
protected void NotifyNewJudgement(JudgementResult result) protected void NotifyNewJudgement(JudgementResult result)
{ {
@ -283,7 +282,6 @@ namespace osu.Game.Rulesets.Scoring
/// <summary> /// <summary>
/// Reverts the score change of a <see cref="JudgementResult"/> that was applied to this <see cref="ScoreProcessor"/>. /// Reverts the score change of a <see cref="JudgementResult"/> that was applied to this <see cref="ScoreProcessor"/>.
/// </summary> /// </summary>
/// <param name="judgement">The judgement to remove.</param>
/// <param name="result">The judgement scoring result.</param> /// <param name="result">The judgement scoring result.</param>
private void revertResult(JudgementResult result) private void revertResult(JudgementResult result)
{ {
@ -340,7 +338,6 @@ namespace osu.Game.Rulesets.Scoring
/// <summary> /// <summary>
/// Reverts the score change of a <see cref="JudgementResult"/> that was applied to this <see cref="ScoreProcessor"/>. /// Reverts the score change of a <see cref="JudgementResult"/> that was applied to this <see cref="ScoreProcessor"/>.
/// </summary> /// </summary>
/// <param name="judgement">The judgement to remove.</param>
/// <param name="result">The judgement scoring result.</param> /// <param name="result">The judgement scoring result.</param>
protected virtual void RevertResult(JudgementResult result) protected virtual void RevertResult(JudgementResult result)
{ {

View File

@ -93,6 +93,7 @@ namespace osu.Game.Rulesets.UI
/// </summary> /// </summary>
/// <param name="ruleset">The ruleset being represented.</param> /// <param name="ruleset">The ruleset being represented.</param>
/// <param name="workingBeatmap">The beatmap to create the hit renderer for.</param> /// <param name="workingBeatmap">The beatmap to create the hit renderer for.</param>
/// <param name="mods">The <see cref="Mod"/>s to apply.</param>
protected DrawableRuleset(Ruleset ruleset, WorkingBeatmap workingBeatmap, IReadOnlyList<Mod> mods) protected DrawableRuleset(Ruleset ruleset, WorkingBeatmap workingBeatmap, IReadOnlyList<Mod> mods)
: base(ruleset) : base(ruleset)
{ {
@ -275,7 +276,8 @@ namespace osu.Game.Rulesets.UI
/// <summary> /// <summary>
/// Applies the active mods to this DrawableRuleset. /// Applies the active mods to this DrawableRuleset.
/// </summary> /// </summary>
/// <param name="mods"></param> /// <param name="mods">The <see cref="Mod"/>s to apply.</param>
/// <param name="config">The <see cref="OsuConfigManager"/> to apply.</param>
private void applyRulesetMods(IReadOnlyList<Mod> mods, OsuConfigManager config) private void applyRulesetMods(IReadOnlyList<Mod> mods, OsuConfigManager config)
{ {
if (mods == null) if (mods == null)

View File

@ -9,7 +9,7 @@ namespace osu.Game.Rulesets.UI
public class GameplayCursorContainer : CursorContainer public class GameplayCursorContainer : CursorContainer
{ {
/// <summary> /// <summary>
/// Because Show/Hide are executed by a parent, <see cref="State"/> is updated immediately even if the cursor /// Because Show/Hide are executed by a parent, <see cref="VisibilityContainer.State"/> is updated immediately even if the cursor
/// is in a non-updating state (via <see cref="FrameStabilityContainer"/> limitations). /// is in a non-updating state (via <see cref="FrameStabilityContainer"/> limitations).
/// ///
/// This holds the true visibility value. /// This holds the true visibility value.

View File

@ -100,7 +100,6 @@ namespace osu.Game.Rulesets.UI
/// <summary> /// <summary>
/// Provide an optional cursor which is to be used for gameplay. /// Provide an optional cursor which is to be used for gameplay.
/// If providing a cursor, <see cref="CursorTargetContainer"/> must also point to a valid target container.
/// </summary> /// </summary>
/// <returns>The cursor, or null if a cursor is not rqeuired.</returns> /// <returns>The cursor, or null if a cursor is not rqeuired.</returns>
protected virtual GameplayCursorContainer CreateCursor() => null; protected virtual GameplayCursorContainer CreateCursor() => null;

View File

@ -43,7 +43,7 @@ namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
/// <param name="currentTime">The current time.</param> /// <param name="currentTime">The current time.</param>
/// <param name="timeRange">The amount of visible time.</param> /// <param name="timeRange">The amount of visible time.</param>
/// <param name="scrollLength">The absolute spatial length through <see cref="timeRange"/>.</param> /// <param name="scrollLength">The absolute spatial length through <see cref="timeRange"/>.</param>
/// <returns>The time at which <see cref="PositionAt(t)"/> == <paramref name="position"/>.</returns> /// <returns>The time at which <see cref="PositionAt(double,double,double,float)"/> == <paramref name="position"/>.</returns>
double TimeAt(float position, double currentTime, double timeRange, float scrollLength); double TimeAt(float position, double currentTime, double timeRange, float scrollLength);
/// <summary> /// <summary>

View File

@ -65,7 +65,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
protected virtual ScrollVisualisationMethod VisualisationMethod => ScrollVisualisationMethod.Sequential; protected virtual ScrollVisualisationMethod VisualisationMethod => ScrollVisualisationMethod.Sequential;
/// <summary> /// <summary>
/// Whether the player can change <see cref="VisibleTimeRange"/>. /// Whether the player can change <see cref="TimeRange"/>.
/// </summary> /// </summary>
protected virtual bool UserScrollSpeedAdjustment => true; protected virtual bool UserScrollSpeedAdjustment => true;

Some files were not shown because too many files have changed in this diff Show More