1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 03:15:36 +08:00

Remove SupportsClosestAnchor for the time being

This may have had a good reason to be added, but I can't find that
reason, so let's keep things simple for the time being.
This commit is contained in:
Dean Herbert 2024-08-09 15:11:57 +09:00
parent 80c814008f
commit 7666e8b932
No known key found for this signature in database
5 changed files with 3 additions and 20 deletions

View File

@ -10,20 +10,17 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI.Scrolling;
using osu.Game.Screens.Play.HUD;
using osu.Game.Skinning;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Mania.Skinning.Argon
{
public partial class ArgonManiaComboCounter : ComboCounter, ISerialisableDrawable
public partial class ArgonManiaComboCounter : ComboCounter
{
private OsuSpriteText text = null!;
protected override double RollingDuration => 500;
protected override Easing RollingEasing => Easing.OutQuint;
bool ISerialisableDrawable.SupportsClosestAnchor => false;
[BackgroundDependencyLoader]
private void load(ScoreProcessor scoreProcessor)
{

View File

@ -11,10 +11,8 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Mania.Skinning.Legacy
{
public partial class LegacyManiaComboCounter : LegacyComboCounter, ISerialisableDrawable
public partial class LegacyManiaComboCounter : LegacyComboCounter
{
bool ISerialisableDrawable.SupportsClosestAnchor => false;
[BackgroundDependencyLoader]
private void load(ISkinSource skin)
{

View File

@ -444,9 +444,6 @@ namespace osu.Game.Overlays.SkinEditor
drawableComponent.Origin = Anchor.TopCentre;
drawableComponent.Anchor = Anchor.TopCentre;
drawableComponent.Y = targetContainer.DrawSize.Y / 2;
if (!component.SupportsClosestAnchor)
component.UsesFixedAnchor = true;
}
try

View File

@ -103,8 +103,7 @@ namespace osu.Game.Overlays.SkinEditor
{
var closestItem = new TernaryStateRadioMenuItem("Closest", MenuItemType.Standard, _ => applyClosestAnchors())
{
State = { Value = GetStateFromSelection(selection, c => !c.Item.UsesFixedAnchor), },
Action = { Disabled = selection.Any(c => !c.Item.SupportsClosestAnchor) },
State = { Value = GetStateFromSelection(selection, c => !c.Item.UsesFixedAnchor) }
};
yield return new OsuMenuItem("Anchor")

View File

@ -27,14 +27,6 @@ namespace osu.Game.Skinning
/// </summary>
bool IsEditable => true;
/// <summary>
/// Whether this component supports the "closest" anchor.
/// </summary>
/// <remarks>
/// This is disabled by some components that shift position automatically.
/// </remarks>
bool SupportsClosestAnchor => true;
/// <summary>
/// In the context of the skin layout editor, whether this <see cref="ISerialisableDrawable"/> has a permanent anchor defined.
/// If <see langword="false"/>, this <see cref="ISerialisableDrawable"/>'s <see cref="Drawable.Anchor"/> is automatically determined by proximity,