Fixing nesting tooltips
This commit is contained in:
26
Patches/TooltipPatch.cs
Normal file
26
Patches/TooltipPatch.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
using BepInEx;
|
||||
using UIFixes.Patches;
|
||||
|
||||
namespace UIFixes
|
||||
{
|
||||
@@ -17,6 +18,7 @@ namespace UIFixes
|
||||
new WeaponBindingPatch().Enable();
|
||||
new DisabledActionsPatch().Enable();
|
||||
SwapPatch.Enable();
|
||||
new TooltipPatch().Enable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net471</TargetFramework>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<AssemblyName>Tyfon.UIFixes</AssemblyName>
|
||||
<Description>SPT UI Fixes</Description>
|
||||
<Version>1.2.0</Version>
|
||||
|
Reference in New Issue
Block a user