mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Rename OverridesClosestAnchor
to UsesFixedAnchor
This commit is contained in:
@ -59,7 +59,7 @@ namespace osu.Game.Extensions
|
|||||||
component.Origin = info.Origin;
|
component.Origin = info.Origin;
|
||||||
|
|
||||||
if (component is ISkinnableDrawable skinnable)
|
if (component is ISkinnableDrawable skinnable)
|
||||||
skinnable.OverridesClosestAnchor = info.OverridesClosestAnchor;
|
skinnable.UsesFixedAnchor = info.UsesFixedAnchor;
|
||||||
|
|
||||||
if (component is Container container)
|
if (component is Container container)
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private HUDOverlay hud { get; set; }
|
private HUDOverlay hud { get; set; }
|
||||||
|
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private HUDOverlay hud { get; set; }
|
private HUDOverlay hud { get; set; }
|
||||||
|
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
public DefaultComboCounter()
|
public DefaultComboCounter()
|
||||||
{
|
{
|
||||||
|
@ -72,7 +72,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
public DefaultHealthDisplay()
|
public DefaultHealthDisplay()
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private HUDOverlay hud { get; set; }
|
private HUDOverlay hud { get; set; }
|
||||||
|
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuColour colours { get; set; }
|
private OsuColour colours { get; set; }
|
||||||
|
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(DrawableRuleset drawableRuleset)
|
private void load(DrawableRuleset drawableRuleset)
|
||||||
|
@ -59,7 +59,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
set => counterContainer.Alpha = value ? 1 : 0;
|
set => counterContainer.Alpha = value ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
public LegacyComboCounter()
|
public LegacyComboCounter()
|
||||||
{
|
{
|
||||||
|
@ -32,8 +32,8 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
public Anchor Origin { get; set; }
|
public Anchor Origin { get; set; }
|
||||||
|
|
||||||
/// <inheritdoc cref="ISkinnableDrawable.OverridesClosestAnchor"/>
|
/// <inheritdoc cref="ISkinnableDrawable.UsesFixedAnchor"/>
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
public List<SkinnableInfo> Children { get; } = new List<SkinnableInfo>();
|
public List<SkinnableInfo> Children { get; } = new List<SkinnableInfo>();
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
Origin = component.Origin;
|
Origin = component.Origin;
|
||||||
|
|
||||||
if (component is ISkinnableDrawable skinnable)
|
if (component is ISkinnableDrawable skinnable)
|
||||||
OverridesClosestAnchor = skinnable.OverridesClosestAnchor;
|
UsesFixedAnchor = skinnable.UsesFixedAnchor;
|
||||||
|
|
||||||
if (component is Container<Drawable> container)
|
if (component is Container<Drawable> container)
|
||||||
{
|
{
|
||||||
|
@ -78,7 +78,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private IClock referenceClock;
|
private IClock referenceClock;
|
||||||
|
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
public SongProgress()
|
public SongProgress()
|
||||||
{
|
{
|
||||||
|
@ -160,7 +160,7 @@ namespace osu.Game.Skinning.Editor
|
|||||||
|
|
||||||
private void updateDrawableAnchorIfUsingClosest(ISkinnableDrawable item)
|
private void updateDrawableAnchorIfUsingClosest(ISkinnableDrawable item)
|
||||||
{
|
{
|
||||||
if (item.OverridesClosestAnchor) return;
|
if (item.UsesFixedAnchor) return;
|
||||||
|
|
||||||
var drawable = (Drawable)item;
|
var drawable = (Drawable)item;
|
||||||
|
|
||||||
@ -188,12 +188,12 @@ namespace osu.Game.Skinning.Editor
|
|||||||
{
|
{
|
||||||
var closestItem = new TernaryStateRadioMenuItem("Closest", MenuItemType.Standard, _ => applyClosestAnchor())
|
var closestItem = new TernaryStateRadioMenuItem("Closest", MenuItemType.Standard, _ => applyClosestAnchor())
|
||||||
{
|
{
|
||||||
State = { Value = GetStateFromSelection(selection, c => !c.Item.OverridesClosestAnchor) }
|
State = { Value = GetStateFromSelection(selection, c => !c.Item.UsesFixedAnchor) }
|
||||||
};
|
};
|
||||||
|
|
||||||
yield return new OsuMenuItem("Anchor")
|
yield return new OsuMenuItem("Anchor")
|
||||||
{
|
{
|
||||||
Items = createAnchorItems((i, a) => i.OverridesClosestAnchor && ((Drawable)i).Anchor == a, applyCustomAnchor)
|
Items = createAnchorItems((i, a) => i.UsesFixedAnchor && ((Drawable)i).Anchor == a, applyCustomAnchor)
|
||||||
.Prepend(closestItem)
|
.Prepend(closestItem)
|
||||||
.ToArray()
|
.ToArray()
|
||||||
};
|
};
|
||||||
@ -261,7 +261,7 @@ namespace osu.Game.Skinning.Editor
|
|||||||
{
|
{
|
||||||
var drawable = (Drawable)item;
|
var drawable = (Drawable)item;
|
||||||
|
|
||||||
item.OverridesClosestAnchor = true;
|
item.UsesFixedAnchor = true;
|
||||||
updateDrawableAnchor(drawable, anchor);
|
updateDrawableAnchor(drawable, anchor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -272,7 +272,7 @@ namespace osu.Game.Skinning.Editor
|
|||||||
{
|
{
|
||||||
var drawable = (Drawable)item;
|
var drawable = (Drawable)item;
|
||||||
|
|
||||||
item.OverridesClosestAnchor = false;
|
item.UsesFixedAnchor = false;
|
||||||
updateDrawableAnchor(drawable, getClosestAnchorForDrawable(drawable));
|
updateDrawableAnchor(drawable, getClosestAnchorForDrawable(drawable));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <see langword="false"/> if this <see cref="ISkinnableDrawable"/>'s <see cref="Drawable.Anchor"/> is automatically determined by proximity,
|
/// <see langword="false"/> if this <see cref="ISkinnableDrawable"/>'s <see cref="Drawable.Anchor"/> is automatically determined by proximity,
|
||||||
/// <see langword="true"/> if the user has overridden it.
|
/// <see langword="true"/> if the user has chosen a fixed anchor point.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool OverridesClosestAnchor { get; set; }
|
bool UsesFixedAnchor { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
public class LegacyAccuracyCounter : GameplayAccuracyCounter, ISkinnableDrawable
|
public class LegacyAccuracyCounter : GameplayAccuracyCounter, ISkinnableDrawable
|
||||||
{
|
{
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
public LegacyAccuracyCounter()
|
public LegacyAccuracyCounter()
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
private bool isNewStyle;
|
private bool isNewStyle;
|
||||||
|
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Skinning
|
|||||||
protected override double RollingDuration => 1000;
|
protected override double RollingDuration => 1000;
|
||||||
protected override Easing RollingEasing => Easing.Out;
|
protected override Easing RollingEasing => Easing.Out;
|
||||||
|
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
public LegacyScoreCounter()
|
public LegacyScoreCounter()
|
||||||
: base(6)
|
: base(6)
|
||||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
public bool IsEditable => false;
|
public bool IsEditable => false;
|
||||||
|
|
||||||
public bool OverridesClosestAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
private readonly Action<Container> applyDefaults;
|
private readonly Action<Container> applyDefaults;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user