Move taskbar down 3 pixels

This commit is contained in:
Tyfon
2024-05-21 13:51:21 -07:00
parent b196656a59
commit 61731461c7
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using Aki.Reflection.Patching;
using EFT.UI;
using HarmonyLib;
using System.Linq;
using System.Reflection;
using UnityEngine;
namespace UIFixes
{
public class MoveTaskbarPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(MenuTaskBar), nameof(MenuTaskBar.Awake));
}
[PatchPostfix]
private static void Postfix(MenuTaskBar __instance)
{
var bottomPanel = __instance.GetComponentsInParent<RectTransform>().First(c => c.name == "BottomPanel");
bottomPanel.localPosition = new Vector3(0f, -3f, 0f);
}
}
}

View File

@@ -27,6 +27,7 @@ namespace UIFixes
new TransferConfirmPatch().Enable();
WeaponPresetConfirmPatches.Enable();
WeaponZoomPatches.Enable();
new MoveTaskbarPatch().Enable();
}
}
}