diff --git a/Patches/TooltipPatch.cs b/Patches/TooltipPatch.cs new file mode 100644 index 0000000..080348b --- /dev/null +++ b/Patches/TooltipPatch.cs @@ -0,0 +1,26 @@ +using Aki.Reflection.Patching; +using EFT.UI.DragAndDrop; +using System; +using System.Reflection; + +namespace UIFixes.Patches +{ + public class TooltipPatch : ModulePatch + { + protected override MethodBase GetTargetMethod() + { + Type type = typeof(QuestItemViewPanel); + return type.GetMethod("method_2"); + } + + [PatchPostfix] + private static void Postfix(QuestItemViewPanel __instance) + { + GridItemView parent = __instance.GetComponentInParent(); + if (parent != null) + { + parent.ShowTooltip(); + } + } + } +} diff --git a/Plugin.cs b/Plugin.cs index 71f9662..9d50b23 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -1,4 +1,5 @@ using BepInEx; +using UIFixes.Patches; namespace UIFixes { @@ -16,7 +17,8 @@ namespace UIFixes WeaponZoomPatch.Enable(); new WeaponBindingPatch().Enable(); new DisabledActionsPatch().Enable(); - SwapPatch.Enable(); + SwapPatch.Enable(); + new TooltipPatch().Enable(); } } } diff --git a/UIFixes.csproj b/UIFixes.csproj index 7b4358e..c94d22f 100644 --- a/UIFixes.csproj +++ b/UIFixes.csproj @@ -1,7 +1,7 @@  - net471 + net472 Tyfon.UIFixes SPT UI Fixes 1.2.0