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;