diff --git a/Patches/AddOfferClickablePricesPatches.cs b/Patches/AddOfferClickablePricesPatches.cs new file mode 100644 index 0000000..b61c564 --- /dev/null +++ b/Patches/AddOfferClickablePricesPatches.cs @@ -0,0 +1,37 @@ +using Aki.Reflection.Patching; +using EFT.UI.Ragfair; +using HarmonyLib; +using System.Linq; +using System.Reflection; +using UnityEngine.UI; + +namespace UIFixes +{ + public class AddOfferClickablePricesPatches : ModulePatch + { + protected override MethodBase GetTargetMethod() + { + return AccessTools.Method(typeof(AddOfferWindow), nameof(AddOfferWindow.Show)); + } + + [PatchPostfix] + public static void Postfix(ItemMarketPricesPanel ____pricesPanel, RequirementView[] ____requirementViews) + { + var panel = ____pricesPanel.R(); + + var rublesRequirement = ____requirementViews.First(rv => rv.name == "Requirement (RUB)"); + + Button lowestButton = panel.LowestLabel.GetOrAddComponent