mirror of
https://github.com/ppy/osu
synced 2025-02-17 02:47:19 +00:00
Rewrite catch combo counter hide logic
This commit is contained in:
parent
fb81e5133f
commit
60b781701f
@ -29,20 +29,17 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
|
|||||||
switch (targetComponent.Target)
|
switch (targetComponent.Target)
|
||||||
{
|
{
|
||||||
case SkinnableTarget.MainHUDComponents:
|
case SkinnableTarget.MainHUDComponents:
|
||||||
if (!providesComboCounter)
|
var components = Source.GetDrawableComponent(component) as SkinnableTargetComponentsContainer;
|
||||||
break;
|
|
||||||
|
|
||||||
if (Source.GetDrawableComponent(component) is SkinnableTargetComponentsContainer components)
|
if (providesComboCounter && components != null)
|
||||||
{
|
{
|
||||||
// catch may provide its own combo counter; hide the default.
|
// 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.
|
// 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>())
|
foreach (var legacyComboCounter in components.OfType<LegacyComboCounter>())
|
||||||
legacyComboCounter.ContentVisible = false;
|
legacyComboCounter.ContentVisible = false;
|
||||||
|
|
||||||
return components;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
return components;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user