mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Disallow beatmap skin to fall back to default HUD components
This should become a more generalized `AllowDefaultSkinFallback` when default legacy skin fallback is supported.
This commit is contained in:
@ -14,6 +14,7 @@ namespace osu.Game.Skinning
|
|||||||
public class LegacyBeatmapSkin : LegacySkin
|
public class LegacyBeatmapSkin : LegacySkin
|
||||||
{
|
{
|
||||||
protected override bool AllowManiaSkin => false;
|
protected override bool AllowManiaSkin => false;
|
||||||
|
protected override bool AllowDefaultHUDComponentsFallback => false;
|
||||||
protected override bool UseCustomSampleBanks => true;
|
protected override bool UseCustomSampleBanks => true;
|
||||||
|
|
||||||
public LegacyBeatmapSkin(BeatmapInfo beatmap, IResourceStore<byte[]> storage, IStorageResourceProvider resources)
|
public LegacyBeatmapSkin(BeatmapInfo beatmap, IResourceStore<byte[]> storage, IStorageResourceProvider resources)
|
||||||
|
@ -38,6 +38,11 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
protected virtual bool AllowManiaSkin => hasKeyTexture.Value;
|
protected virtual bool AllowManiaSkin => hasKeyTexture.Value;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this skin will fall back to default HUD components if it has no fonts for use.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual bool AllowDefaultHUDComponentsFallback => true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether this skin can use samples with a custom bank (custom sample set in stable terminology).
|
/// Whether this skin can use samples with a custom bank (custom sample set in stable terminology).
|
||||||
/// Added in order to match sample lookup logic from stable (in stable, only the beatmap skin could use samples with a custom sample bank).
|
/// Added in order to match sample lookup logic from stable (in stable, only the beatmap skin could use samples with a custom sample bank).
|
||||||
@ -331,6 +336,8 @@ namespace osu.Game.Skinning
|
|||||||
switch (target.Target)
|
switch (target.Target)
|
||||||
{
|
{
|
||||||
case SkinnableTarget.MainHUDComponents:
|
case SkinnableTarget.MainHUDComponents:
|
||||||
|
if (!this.HasFont(LegacyFont.Score) && !AllowDefaultHUDComponentsFallback)
|
||||||
|
return null;
|
||||||
|
|
||||||
var skinnableTargetWrapper = new SkinnableTargetComponentsContainer(container =>
|
var skinnableTargetWrapper = new SkinnableTargetComponentsContainer(container =>
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user