From 6cbc5f8d62f0376d36979456ed26400f58cd72a0 Mon Sep 17 00:00:00 2001 From: Tyfon <29051038+tyfon7@users.noreply.github.com> Date: Mon, 13 May 2024 18:40:14 -0700 Subject: [PATCH] Expand description, move left/right --- Patches/ItemPanelResizePatches.cs | 170 ++++++++++++++++++++++++------ Settings.cs | 10 ++ 2 files changed, 146 insertions(+), 34 deletions(-) diff --git a/Patches/ItemPanelResizePatches.cs b/Patches/ItemPanelResizePatches.cs index eb829c0..1ff8af0 100644 --- a/Patches/ItemPanelResizePatches.cs +++ b/Patches/ItemPanelResizePatches.cs @@ -1,7 +1,9 @@ using Aki.Reflection.Patching; +using EFT.InputSystem; using EFT.InventoryLogic; using EFT.UI; using HarmonyLib; +using System.Collections.Generic; using System.Linq; using System.Reflection; using UnityEngine; @@ -14,16 +16,19 @@ namespace UIFixes private static float SavedPreferredWidth = -1f; private static float SavedPreferredHeight = -1f; - // Seems like this is the default for everything? + // Seems like this is the always the default for ItemSpecificationPanels private const float DefaultPreferredWidth = 670f; private const float DefaultPreferredHeight = 500f; private const string RestoreButtonName = "Restore"; + private const float ButtonPadding = 3f; + public static void Enable() { new ResizeWindowPatch().Enable(); new ShowPatch().Enable(); + new ItemUiContextInspectPatch().Enable(); } private class ResizeWindowPatch : ModulePatch @@ -65,7 +70,7 @@ namespace UIFixes { if (Settings.RememberInspectSize.Value) { - Resize(___layoutElement_0); + RestoreSavedSize(___layoutElement_0); } } @@ -84,41 +89,100 @@ namespace UIFixes Button closeButton = __instance.GetComponentsInChildren