mirror of https://github.com/ppy/osu
Rewrite catch combo counter hide logic
This commit is contained in:
parent
fb81e5133f
commit
60b781701f
|
@ -29,20 +29,17 @@ public override Drawable GetDrawableComponent(ISkinComponent component)
|
|||
switch (targetComponent.Target)
|
||||
{
|
||||
case SkinnableTarget.MainHUDComponents:
|
||||
if (!providesComboCounter)
|
||||
break;
|
||||
var components = Source.GetDrawableComponent(component) as SkinnableTargetComponentsContainer;
|
||||
|
||||
if (Source.GetDrawableComponent(component) is SkinnableTargetComponentsContainer components)
|
||||
if (providesComboCounter && components != null)
|
||||
{
|
||||
// catch may provide its own combo counter; hide the default.
|
||||
// todo: this should be done in an elegant way per ruleset, defining which HUD skin components should be displayed.
|
||||
foreach (var legacyComboCounter in components.OfType<LegacyComboCounter>())
|
||||
legacyComboCounter.ContentVisible = false;
|
||||
|
||||
return components;
|
||||
}
|
||||
|
||||
break;
|
||||
return components;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue