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:
parent
80c814008f
commit
7666e8b932
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user