mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Add UsingClosestAnchor to ISkinnableDrawable
Also implement it as an auto property in its inheritors. The auto properties default to true.
This commit is contained in:
@ -12,6 +12,8 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private HUDOverlay hud { get; set; }
|
private HUDOverlay hud { get; set; }
|
||||||
|
|
||||||
|
public bool UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,8 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private HUDOverlay hud { get; set; }
|
private HUDOverlay hud { get; set; }
|
||||||
|
|
||||||
|
public bool UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
public DefaultComboCounter()
|
public DefaultComboCounter()
|
||||||
{
|
{
|
||||||
Current.Value = DisplayedCount = 0;
|
Current.Value = DisplayedCount = 0;
|
||||||
|
@ -72,6 +72,8 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
public DefaultHealthDisplay()
|
public DefaultHealthDisplay()
|
||||||
{
|
{
|
||||||
Size = new Vector2(1, 5);
|
Size = new Vector2(1, 5);
|
||||||
|
@ -20,6 +20,8 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private HUDOverlay hud { get; set; }
|
private HUDOverlay hud { get; set; }
|
||||||
|
|
||||||
|
public bool UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
|
@ -22,6 +22,8 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuColour colours { get; set; }
|
private OsuColour colours { get; set; }
|
||||||
|
|
||||||
|
public bool UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(DrawableRuleset drawableRuleset)
|
private void load(DrawableRuleset drawableRuleset)
|
||||||
{
|
{
|
||||||
|
@ -59,6 +59,8 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
set => counterContainer.Alpha = value ? 1 : 0;
|
set => counterContainer.Alpha = value ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
public LegacyComboCounter()
|
public LegacyComboCounter()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
|
@ -32,11 +32,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
public Anchor Origin { get; set; }
|
public Anchor Origin { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc cref="ISkinnableDrawable.UsingClosestAnchor"/>
|
||||||
/// <p><see langword="true"/> if this <see cref="ISkinnableDrawable"/>'s <see cref="Drawable.Anchor"/> is
|
|
||||||
/// automatically determined by proximity, <see langword="false"/> if the user has overridden it.</p>
|
|
||||||
/// <p>Corresponds to <see cref="osu.Game.Extensions.DrawableExtensions.UsingClosestAnchor"/> at runtime.</p>
|
|
||||||
/// </summary>
|
|
||||||
public bool UsingClosestAnchor { get; set; } = true;
|
public bool UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
public List<SkinnableInfo> Children { get; } = new List<SkinnableInfo>();
|
public List<SkinnableInfo> Children { get; } = new List<SkinnableInfo>();
|
||||||
|
@ -78,6 +78,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private IClock referenceClock;
|
private IClock referenceClock;
|
||||||
|
|
||||||
|
public bool UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
public SongProgress()
|
public SongProgress()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
|
@ -14,5 +14,11 @@ namespace osu.Game.Skinning
|
|||||||
/// Whether this component should be editable by an end user.
|
/// Whether this component should be editable by an end user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool IsEditable => true;
|
bool IsEditable => true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <see langword="true"/> if this <see cref="ISkinnableDrawable"/>'s <see cref="Drawable.Anchor"/> is automatically determined by proximity,
|
||||||
|
/// <see langword="false"/> if the user has overridden it.
|
||||||
|
/// </summary>
|
||||||
|
bool UsingClosestAnchor { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,8 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
public class LegacyAccuracyCounter : GameplayAccuracyCounter, ISkinnableDrawable
|
public class LegacyAccuracyCounter : GameplayAccuracyCounter, ISkinnableDrawable
|
||||||
{
|
{
|
||||||
|
public bool UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
public LegacyAccuracyCounter()
|
public LegacyAccuracyCounter()
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight;
|
Anchor = Anchor.TopRight;
|
||||||
|
@ -30,6 +30,8 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
private bool isNewStyle;
|
private bool isNewStyle;
|
||||||
|
|
||||||
|
public bool UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
|
@ -13,6 +13,8 @@ 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 UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
public LegacyScoreCounter()
|
public LegacyScoreCounter()
|
||||||
: base(6)
|
: base(6)
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,8 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
public bool IsEditable => false;
|
public bool IsEditable => false;
|
||||||
|
|
||||||
|
public bool UsingClosestAnchor { get; set; } = true;
|
||||||
|
|
||||||
private readonly Action<Container> applyDefaults;
|
private readonly Action<Container> applyDefaults;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Reference in New Issue
Block a user