Files
ADOFAIRenderer/Patch/Game/scrHitTextManagerPatch.cs
T
2026-10-15 16:17:13 +09:00

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 &gt;= 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 } };
}
}