mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 19:13:21 +08:00
Fix timeline objects sometimes not receiving combo colours
This commit is contained in:
parent
857417c6e9
commit
f562854feb
@ -55,6 +55,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
|
|
||||||
private const float circle_size = 24;
|
private const float circle_size = 24;
|
||||||
|
|
||||||
|
[Resolved(CanBeNull = true)]
|
||||||
|
private HitObjectComposer composer { get; set; }
|
||||||
|
|
||||||
public TimelineHitObjectBlueprint(HitObject hitObject)
|
public TimelineHitObjectBlueprint(HitObject hitObject)
|
||||||
: base(hitObject)
|
: base(hitObject)
|
||||||
{
|
{
|
||||||
@ -152,19 +155,15 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
updateShadows();
|
updateShadows();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
protected override void LoadComplete()
|
||||||
private void load(HitObjectComposer composer)
|
|
||||||
{
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
if (composer != null)
|
if (composer != null)
|
||||||
{
|
{
|
||||||
// best effort to get the drawable representation for grabbing colour and what not.
|
// best effort to get the drawable representation for grabbing colour and what not.
|
||||||
drawableHitObject = composer.HitObjects.FirstOrDefault(d => d.HitObject == HitObject);
|
drawableHitObject = composer.HitObjects.FirstOrDefault(d => d.HitObject == HitObject);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
if (HitObject is IHasComboInformation comboInfo)
|
if (HitObject is IHasComboInformation comboInfo)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user