mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 11:32:54 +08:00
Disable "closest" anchor in mania combo counter for convenience
This commit is contained in:
parent
95961dc989
commit
01219fa371
@ -441,6 +441,9 @@ 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
|
||||
|
@ -233,7 +233,8 @@ namespace osu.Game.Overlays.SkinEditor
|
||||
{
|
||||
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")
|
||||
|
@ -27,6 +27,14 @@ 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