mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:13:21 +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.Scoring;
|
||||||
using osu.Game.Rulesets.UI.Scrolling;
|
using osu.Game.Rulesets.UI.Scrolling;
|
||||||
using osu.Game.Screens.Play.HUD;
|
using osu.Game.Screens.Play.HUD;
|
||||||
using osu.Game.Skinning;
|
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
||||||
{
|
{
|
||||||
public partial class ArgonManiaComboCounter : ComboCounter, ISerialisableDrawable
|
public partial class ArgonManiaComboCounter : ComboCounter
|
||||||
{
|
{
|
||||||
private OsuSpriteText text = null!;
|
private OsuSpriteText text = null!;
|
||||||
|
|
||||||
protected override double RollingDuration => 500;
|
protected override double RollingDuration => 500;
|
||||||
protected override Easing RollingEasing => Easing.OutQuint;
|
protected override Easing RollingEasing => Easing.OutQuint;
|
||||||
|
|
||||||
bool ISerialisableDrawable.SupportsClosestAnchor => false;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(ScoreProcessor scoreProcessor)
|
private void load(ScoreProcessor scoreProcessor)
|
||||||
{
|
{
|
||||||
|
@ -11,10 +11,8 @@ using osuTK.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Skinning.Legacy
|
namespace osu.Game.Rulesets.Mania.Skinning.Legacy
|
||||||
{
|
{
|
||||||
public partial class LegacyManiaComboCounter : LegacyComboCounter, ISerialisableDrawable
|
public partial class LegacyManiaComboCounter : LegacyComboCounter
|
||||||
{
|
{
|
||||||
bool ISerialisableDrawable.SupportsClosestAnchor => false;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(ISkinSource skin)
|
private void load(ISkinSource skin)
|
||||||
{
|
{
|
||||||
|
@ -444,9 +444,6 @@ namespace osu.Game.Overlays.SkinEditor
|
|||||||
drawableComponent.Origin = Anchor.TopCentre;
|
drawableComponent.Origin = Anchor.TopCentre;
|
||||||
drawableComponent.Anchor = Anchor.TopCentre;
|
drawableComponent.Anchor = Anchor.TopCentre;
|
||||||
drawableComponent.Y = targetContainer.DrawSize.Y / 2;
|
drawableComponent.Y = targetContainer.DrawSize.Y / 2;
|
||||||
|
|
||||||
if (!component.SupportsClosestAnchor)
|
|
||||||
component.UsesFixedAnchor = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -103,8 +103,7 @@ namespace osu.Game.Overlays.SkinEditor
|
|||||||
{
|
{
|
||||||
var closestItem = new TernaryStateRadioMenuItem("Closest", MenuItemType.Standard, _ => applyClosestAnchors())
|
var closestItem = new TernaryStateRadioMenuItem("Closest", MenuItemType.Standard, _ => applyClosestAnchors())
|
||||||
{
|
{
|
||||||
State = { Value = GetStateFromSelection(selection, c => !c.Item.UsesFixedAnchor), },
|
State = { Value = GetStateFromSelection(selection, c => !c.Item.UsesFixedAnchor) }
|
||||||
Action = { Disabled = selection.Any(c => !c.Item.SupportsClosestAnchor) },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
yield return new OsuMenuItem("Anchor")
|
yield return new OsuMenuItem("Anchor")
|
||||||
|
@ -27,14 +27,6 @@ namespace osu.Game.Skinning
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
bool IsEditable => true;
|
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>
|
/// <summary>
|
||||||
/// In the context of the skin layout editor, whether this <see cref="ISerialisableDrawable"/> has a permanent anchor defined.
|
/// 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,
|
/// 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