From 0c2f2b37475c759d67e5ab1dbaf0356a3f792491 Mon Sep 17 00:00:00 2001 From: Tyfon <29051038+tyfon7@users.noreply.github.com> Date: Sun, 2 Jun 2024 14:57:12 -0700 Subject: [PATCH] Fix R change --- R.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/R.cs b/R.cs index b816656..4be8758 100644 --- a/R.cs +++ b/R.cs @@ -24,6 +24,7 @@ namespace UIFixes { // Order is significant, as some reference each other UIElement.InitUITypes(); + UIInputNode.InitUITypes(); UIContext.InitTypes(); DialogWindow.InitTypes(); ControlSettings.InitTypes(); @@ -72,6 +73,18 @@ namespace UIFixes public UIContext UI { get { return new UIContext(UIField.GetValue(Value)); } } } + public class UIInputNode(object value) : Wrapper(value) + { + private static FieldInfo UIField; + + public static void InitUITypes() + { + UIField = AccessTools.Field(typeof(EFT.UI.UIInputNode), "UI"); + } + + public UIContext UI { get { return new UIContext(UIField.GetValue(Value)); } } + } + public class UIContext(object value) : Wrapper(value) { public static Type Type { get; private set; } @@ -510,7 +523,7 @@ namespace UIFixes public static Dictionary GetMoneySums(IEnumerable items) => (Dictionary)GetMoneySumsMethod.Invoke(null, [items]); } - public class TraderScreensGroup(object value) : UIElement(value) + public class TraderScreensGroup(object value) : UIInputNode(value) { public static Type Type { get; private set; } private static FieldInfo BuyTabField;