gridviews can accept directly, 2nd+ items get quickfind spots, highlighting

This commit is contained in:
Tyfon
2024-06-16 16:46:14 -07:00
parent 29e352eee9
commit c5836eb588
4 changed files with 215 additions and 15 deletions

3
R.cs
View File

@@ -291,16 +291,19 @@ namespace UIFixes
public static Type Type { get; private set; }
private static FieldInfo TraderControllerField;
private static FieldInfo NonInteractableField;
private static FieldInfo HighlightPanelField;
public static void InitTypes()
{
Type = typeof(EFT.UI.DragAndDrop.GridView);
TraderControllerField = AccessTools.GetDeclaredFields(Type).Single(f => f.FieldType == typeof(TraderControllerClass)); // field gclass2758_0
NonInteractableField = AccessTools.Field(Type, "_nonInteractable");
HighlightPanelField = AccessTools.Field(Type, "_highlightPanel");
}
public TraderControllerClass TraderController { get { return (TraderControllerClass)TraderControllerField.GetValue(Value); } }
public bool NonInteractable { get { return (bool)NonInteractableField.GetValue(Value); } }
public Image HighlightPanel { get { return (Image)HighlightPanelField.GetValue(Value); } }
}
public class GridViewCanAcceptOperation(object value) : Wrapper(value)