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