SHA256
24 lines
1.1 KiB
C#
24 lines
1.1 KiB
C#
using ADOFAIRenderer.Core;
|
|
using HarmonyLib;
|
|
|
|
namespace ADOFAIRenderer.Patch.Game;
|
|
|
|
/// <summary>
|
|
/// Hides the judgement texts (e.g. Perfect, Early, Late) during a render unless the render configuration enables them.
|
|
/// <para>
|
|
/// Patched member: <c>scrHitTextManager.ShowHitText(HitMargin, scrPlanet, float, int?)</c>, which shows the hit margin
|
|
/// text at the planet for each hit (the game itself skips it for no-HUD modes and hidden margins).
|
|
/// </para>
|
|
/// <para>Active while <see cref="RenderManager.IsActive"/> (stage >= OnScene) and <c>RenderConfig.ShowJudgementText</c> is false.</para>
|
|
/// </summary>
|
|
[HarmonyPatch(typeof(scrHitTextManager), "ShowHitText")]
|
|
// ReSharper disable once InconsistentNaming
|
|
public class scrHitTextManagerPatch
|
|
{
|
|
/// <summary>Prefix of <c>scrHitTextManager.ShowHitText</c>.</summary>
|
|
/// <returns>True to run the original method (not rendering, or judgement texts enabled); false to skip it.</returns>
|
|
public static bool Prefix()
|
|
{
|
|
return !RenderManager.IsActive || RenderManager.Instance is { Configuration: { ShowJudgementText: true } };
|
|
}
|
|
} |