1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 03:42:57 +08:00

Fix cinema mod not hiding playfield skin layer

This commit is contained in:
Dean Herbert 2024-05-27 14:38:43 +09:00
parent d55fa423e9
commit 11c3d11db9
No known key found for this signature in database
2 changed files with 11 additions and 6 deletions

View File

@ -36,6 +36,8 @@ namespace osu.Game.Rulesets.Mods
{
overlay.ShowHud.Value = false;
overlay.ShowHud.Disabled = true;
overlay.PlayfieldSkinLayer.Hide();
}
public void ApplyToPlayer(Player player)

View File

@ -109,7 +109,10 @@ namespace osu.Game.Screens.Play
private readonly List<Drawable> hideTargets;
private readonly Drawable playfieldComponents;
/// <summary>
/// The container for skin components attached to <see cref="TargetArea.Playfield"/>
/// </summary>
internal readonly Drawable PlayfieldSkinLayer;
public HUDOverlay([CanBeNull] DrawableRuleset drawableRuleset, IReadOnlyList<Mod> mods, bool alwaysShowLeaderboard = true)
{
@ -129,7 +132,7 @@ namespace osu.Game.Screens.Play
drawableRuleset != null
? (rulesetComponents = new HUDComponentsContainer(drawableRuleset.Ruleset.RulesetInfo) { AlwaysPresent = true, })
: Empty(),
playfieldComponents = drawableRuleset != null
PlayfieldSkinLayer = drawableRuleset != null
? new SkinComponentsContainer(new SkinComponentsContainerLookup(SkinComponentsContainerLookup.TargetArea.Playfield, drawableRuleset.Ruleset.RulesetInfo)) { AlwaysPresent = true, }
: Empty(),
topRightElements = new FillFlowContainer
@ -247,10 +250,10 @@ namespace osu.Game.Screens.Play
{
Quad playfieldScreenSpaceDrawQuad = drawableRuleset.Playfield.SkinnableComponentScreenSpaceDrawQuad;
playfieldComponents.Position = ToLocalSpace(playfieldScreenSpaceDrawQuad.TopLeft);
playfieldComponents.Width = (ToLocalSpace(playfieldScreenSpaceDrawQuad.TopRight) - ToLocalSpace(playfieldScreenSpaceDrawQuad.TopLeft)).Length;
playfieldComponents.Height = (ToLocalSpace(playfieldScreenSpaceDrawQuad.BottomLeft) - ToLocalSpace(playfieldScreenSpaceDrawQuad.TopLeft)).Length;
playfieldComponents.Rotation = drawableRuleset.Playfield.Rotation;
PlayfieldSkinLayer.Position = ToLocalSpace(playfieldScreenSpaceDrawQuad.TopLeft);
PlayfieldSkinLayer.Width = (ToLocalSpace(playfieldScreenSpaceDrawQuad.TopRight) - ToLocalSpace(playfieldScreenSpaceDrawQuad.TopLeft)).Length;
PlayfieldSkinLayer.Height = (ToLocalSpace(playfieldScreenSpaceDrawQuad.BottomLeft) - ToLocalSpace(playfieldScreenSpaceDrawQuad.TopLeft)).Length;
PlayfieldSkinLayer.Rotation = drawableRuleset.Playfield.Rotation;
}
float? lowestTopScreenSpaceLeft = null;