20 lines
557 B
C#
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;
|
|
}
|
|
}
|
|
}
|