worldbox-observer-mod/IdleSpectator/CanvasMainPatches.cs
2026-07-14 14:17:42 -05:00

20 lines
557 B
C#

using HarmonyLib;
namespace IdleSpectator;
/// <summary>
/// Keep the power bar hidden for the whole Idle Spectator session, even if focus
/// briefly drops between targets (vanilla only hides it while a focus unit is set).
/// </summary>
[HarmonyPatch(typeof(CanvasMain), nameof(CanvasMain.isBottomBarShowing))]
internal static class CanvasMainPatches
{
[HarmonyPostfix]
private static void KeepPowerBarHiddenWhileIdleSpectating(ref bool __result)
{
if (SpectatorMode.Active)
{
__result = false;
}
}
}