Reverting flea dialog select
This commit is contained in:
@@ -1,25 +1,13 @@
|
||||
using Aki.Reflection.Patching;
|
||||
using EFT.InventoryLogic;
|
||||
using EFT.UI;
|
||||
using EFT.UI.Ragfair;
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UIFixes
|
||||
{
|
||||
public class DialogPatches
|
||||
{
|
||||
public static void Enable()
|
||||
{
|
||||
new DialogWindowPatch().Enable();
|
||||
new FleaPurchaseDialogPatch().Enable();
|
||||
}
|
||||
|
||||
private class DialogWindowPatch : ModulePatch
|
||||
public class DialogPatch : ModulePatch
|
||||
{
|
||||
private static MethodInfo AcceptMethod;
|
||||
|
||||
@@ -46,21 +34,4 @@ namespace UIFixes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class FleaPurchaseDialogPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
// The parent has a Show() so need to be specific
|
||||
return typeof(HandoverRagfairMoneyWindow).GetMethods().First(m => m.Name == "Show" && m.GetParameters()[0].ParameterType == typeof(Inventory));
|
||||
}
|
||||
|
||||
[PatchPostfix]
|
||||
private static void Postfix(TMP_InputField ____inputField)
|
||||
{
|
||||
____inputField.Select();
|
||||
____inputField.ActivateInputField();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user