mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
add forced video/storyboard and disabled dim for mod inside new interface
This commit is contained in:
26
osu.Game/Rulesets/Mods/IApplicableToScreen.cs
Normal file
26
osu.Game/Rulesets/Mods/IApplicableToScreen.cs
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface for a mod which can temporarily override screen settings.
|
||||
/// </summary>
|
||||
public interface IApplicableToScreen : IApplicableMod
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether to enable image, video and storyboard dimming
|
||||
/// </summary>
|
||||
bool EnableDim { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Weather to force the video (if present)
|
||||
/// </summary>
|
||||
bool ForceVideo { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Weather to force the storyboard (if present)
|
||||
/// </summary>
|
||||
bool ForceStoryboard { get; }
|
||||
}
|
||||
}
|
@ -1,7 +1,10 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.UI;
|
||||
@ -21,7 +24,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
}
|
||||
}
|
||||
|
||||
public class ModCinema : ModAutoplay, IApplicableToHUD
|
||||
public class ModCinema : ModAutoplay, IApplicableToHUD, IApplicableToScreen
|
||||
{
|
||||
public override string Name => "Cinema";
|
||||
public override string Acronym => "CN";
|
||||
@ -33,5 +36,9 @@ namespace osu.Game.Rulesets.Mods
|
||||
overlay.AlwaysPresent = true;
|
||||
overlay.Hide();
|
||||
}
|
||||
|
||||
public bool EnableDim => false;
|
||||
public bool ForceVideo => true;
|
||||
public bool ForceStoryboard => true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user