mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 17:52:54 +08:00
Merge pull request #18101 from peppy/cache-at-interface
Move caching specification to interface for several editor interfaces
This commit is contained in:
commit
ab2e30d625
@ -23,7 +23,6 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// Represents a <see cref="HitObjectComposer{TObject}"/> for rulesets with the concept of distances between objects.
|
/// Represents a <see cref="HitObjectComposer{TObject}"/> for rulesets with the concept of distances between objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TObject">The base type of supported objects.</typeparam>
|
/// <typeparam name="TObject">The base type of supported objects.</typeparam>
|
||||||
[Cached(typeof(IDistanceSnapProvider))]
|
|
||||||
public abstract class DistancedHitObjectComposer<TObject> : HitObjectComposer<TObject>, IDistanceSnapProvider, IScrollBindingHandler<GlobalAction>
|
public abstract class DistancedHitObjectComposer<TObject> : HitObjectComposer<TObject>, IDistanceSnapProvider, IScrollBindingHandler<GlobalAction>
|
||||||
where TObject : HitObject
|
where TObject : HitObject
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,6 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// Responsible for providing snapping and generally gluing components together.
|
/// Responsible for providing snapping and generally gluing components together.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TObject">The base type of supported objects.</typeparam>
|
/// <typeparam name="TObject">The base type of supported objects.</typeparam>
|
||||||
[Cached(Type = typeof(IPlacementHandler))]
|
|
||||||
public abstract class HitObjectComposer<TObject> : HitObjectComposer, IPlacementHandler
|
public abstract class HitObjectComposer<TObject> : HitObjectComposer, IPlacementHandler
|
||||||
where TObject : HitObject
|
where TObject : HitObject
|
||||||
{
|
{
|
||||||
@ -388,8 +387,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// A non-generic definition of a HitObject composer class.
|
/// A non-generic definition of a HitObject composer class.
|
||||||
/// Generally used to access certain methods without requiring a generic type for <see cref="HitObjectComposer{T}" />.
|
/// Generally used to access certain methods without requiring a generic type for <see cref="HitObjectComposer{T}" />.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Cached(typeof(HitObjectComposer))]
|
[Cached]
|
||||||
[Cached(typeof(IPositionSnapProvider))]
|
|
||||||
public abstract class HitObjectComposer : CompositeDrawable, IPositionSnapProvider
|
public abstract class HitObjectComposer : CompositeDrawable, IPositionSnapProvider
|
||||||
{
|
{
|
||||||
protected HitObjectComposer()
|
protected HitObjectComposer()
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
// 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.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Edit
|
namespace osu.Game.Rulesets.Edit
|
||||||
{
|
{
|
||||||
|
[Cached]
|
||||||
public interface IDistanceSnapProvider : IPositionSnapProvider
|
public interface IDistanceSnapProvider : IPositionSnapProvider
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,6 +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.Allocation;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Edit
|
namespace osu.Game.Rulesets.Edit
|
||||||
@ -9,6 +10,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// A snap provider which given a proposed position for a hit object, potentially offers a more correct position and time value inferred from the context of the beatmap.
|
/// A snap provider which given a proposed position for a hit object, potentially offers a more correct position and time value inferred from the context of the beatmap.
|
||||||
/// Provided values are inferred in an isolated context, without consideration of other nearby hit objects.
|
/// Provided values are inferred in an isolated context, without consideration of other nearby hit objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Cached]
|
||||||
public interface IPositionSnapProvider
|
public interface IPositionSnapProvider
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -19,7 +19,6 @@ using osuTK;
|
|||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||||
{
|
{
|
||||||
[Cached(typeof(IPositionSnapProvider))]
|
|
||||||
[Cached]
|
[Cached]
|
||||||
public class Timeline : ZoomableScrollContainer, IPositionSnapProvider
|
public class Timeline : ZoomableScrollContainer, IPositionSnapProvider
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
// 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.Allocation;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Compose
|
namespace osu.Game.Screens.Edit.Compose
|
||||||
{
|
{
|
||||||
|
[Cached]
|
||||||
public interface IPlacementHandler
|
public interface IPlacementHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -14,7 +14,6 @@ using osu.Game.Screens.Edit.Compose;
|
|||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
{
|
{
|
||||||
[Cached(Type = typeof(IPlacementHandler))]
|
|
||||||
public abstract class PlacementBlueprintTestScene : OsuManualInputManagerTestScene, IPlacementHandler
|
public abstract class PlacementBlueprintTestScene : OsuManualInputManagerTestScene, IPlacementHandler
|
||||||
{
|
{
|
||||||
protected readonly Container HitObjectContainer;
|
protected readonly Container HitObjectContainer;
|
||||||
|
Loading…
Reference in New Issue
Block a user