diff --git a/Patches/MoveTaskbarPatch.cs b/Patches/MoveTaskbarPatch.cs new file mode 100644 index 0000000..3a60dd9 --- /dev/null +++ b/Patches/MoveTaskbarPatch.cs @@ -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().First(c => c.name == "BottomPanel"); + + bottomPanel.localPosition = new Vector3(0f, -3f, 0f); + } + } +} diff --git a/Plugin.cs b/Plugin.cs index 02b4efd..dc2de30 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -27,6 +27,7 @@ namespace UIFixes new TransferConfirmPatch().Enable(); WeaponPresetConfirmPatches.Enable(); WeaponZoomPatches.Enable(); + new MoveTaskbarPatch().Enable(); } } }