mirror of
https://github.com/osukey/osukey.git
synced 2025-05-06 22:27:25 +09:00
Remove skin dependency as component is reinitialized on skin change
This commit is contained in:
parent
7582c943a4
commit
cb62d3d4b9
@ -44,9 +44,6 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
private readonly Container counterContainer;
|
private readonly Container counterContainer;
|
||||||
|
|
||||||
[Resolved]
|
|
||||||
private ISkinSource skin { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Hides the combo counter internally without affecting its <see cref="SkinnableInfo"/>.
|
/// Hides the combo counter internally without affecting its <see cref="SkinnableInfo"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -135,8 +132,6 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
Current.BindValueChanged(combo => updateCount(combo.NewValue == 0), true);
|
Current.BindValueChanged(combo => updateCount(combo.NewValue == 0), true);
|
||||||
|
|
||||||
// Since layout depends on combo font height we need to update it during skin change
|
|
||||||
skin.SourceChanged += updateLayout;
|
|
||||||
updateLayout();
|
updateLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,13 +287,5 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
double difference = currentValue > newValue ? currentValue - newValue : newValue - currentValue;
|
double difference = currentValue > newValue ? currentValue - newValue : newValue - currentValue;
|
||||||
return difference * rolling_duration;
|
return difference * rolling_duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
|
||||||
{
|
|
||||||
base.Dispose(isDisposing);
|
|
||||||
|
|
||||||
if (skin != null)
|
|
||||||
skin.SourceChanged -= updateLayout;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user