Fixing nesting tooltips

This commit is contained in:
Tyfon
2024-04-27 00:57:06 -07:00
parent 7894e80cea
commit 9c77de2c66
3 changed files with 30 additions and 2 deletions

26
Patches/TooltipPatch.cs Normal file
View File

@@ -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<GridItemView>();
if (parent != null)
{
parent.ShowTooltip();
}
}
}
}