mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 04:13:03 +08:00
Use hitTarget in place of stageHint
This commit is contained in:
parent
51000765dd
commit
20c5748342
@ -22,13 +22,13 @@ namespace osu.Game.Rulesets.Mania.UI.Components
|
|||||||
|
|
||||||
private readonly IBindable<ScrollingDirection> direction = new Bindable<ScrollingDirection>();
|
private readonly IBindable<ScrollingDirection> direction = new Bindable<ScrollingDirection>();
|
||||||
|
|
||||||
private readonly Drawable stageHint;
|
private readonly Drawable hitTarget;
|
||||||
|
|
||||||
public ColumnHitObjectArea(HitObjectContainer hitObjectContainer)
|
public ColumnHitObjectArea(HitObjectContainer hitObjectContainer)
|
||||||
{
|
{
|
||||||
InternalChildren = new[]
|
InternalChildren = new[]
|
||||||
{
|
{
|
||||||
stageHint = new DefaultStageHint
|
hitTarget = new DefaultHitTarget
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
},
|
},
|
||||||
@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Mania.UI.Components
|
|||||||
{
|
{
|
||||||
Anchor anchor = dir.NewValue == ScrollingDirection.Up ? Anchor.TopLeft : Anchor.BottomLeft;
|
Anchor anchor = dir.NewValue == ScrollingDirection.Up ? Anchor.TopLeft : Anchor.BottomLeft;
|
||||||
|
|
||||||
stageHint.Anchor = stageHint.Origin = anchor;
|
hitTarget.Anchor = hitTarget.Origin = anchor;
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,19 +60,19 @@ namespace osu.Game.Rulesets.Mania.UI.Components
|
|||||||
|
|
||||||
accentColour = value;
|
accentColour = value;
|
||||||
|
|
||||||
if (stageHint is IHasAccentColour colouredHitTarget)
|
if (hitTarget is IHasAccentColour colouredHitTarget)
|
||||||
colouredHitTarget.AccentColour = accentColour;
|
colouredHitTarget.AccentColour = accentColour;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DefaultStageHint : CompositeDrawable, IHasAccentColour
|
private class DefaultHitTarget : CompositeDrawable, IHasAccentColour
|
||||||
{
|
{
|
||||||
private readonly IBindable<ScrollingDirection> direction = new Bindable<ScrollingDirection>();
|
private readonly IBindable<ScrollingDirection> direction = new Bindable<ScrollingDirection>();
|
||||||
|
|
||||||
private readonly Container hitTargetLine;
|
private readonly Container hitTargetLine;
|
||||||
private readonly Drawable hitTargetBar;
|
private readonly Drawable hitTargetBar;
|
||||||
|
|
||||||
public DefaultStageHint()
|
public DefaultHitTarget()
|
||||||
{
|
{
|
||||||
InternalChildren = new[]
|
InternalChildren = new[]
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user