This commit is contained in:
Tyfon
2024-06-05 14:37:05 -07:00
parent 5b2fb51a18
commit 73aabbf96a
4 changed files with 6 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace UIFixes.Patches
namespace UIFixes
{
public static class KeepWindowsOnScreenPatches
{
@@ -27,7 +27,7 @@ namespace UIFixes.Patches
public class KeepWindowOnScreenPatch(string methodName) : ModulePatch
{
private string methodName = methodName;
private readonly string methodName = methodName;
protected override MethodBase GetTargetMethod()
{

View File

@@ -32,7 +32,9 @@ namespace UIFixes
}
scrollRect.verticalNormalizedPosition = StashScrollPosition;
scrollRect.onValueChanged.AddListener(UpdateScrollPosition);
element.R().UI.AddDisposable(() => scrollRect.onValueChanged.RemoveListener(UpdateScrollPosition));
}
public class SyncStashScrollPatch : ModulePatch

View File

@@ -1,7 +1,6 @@
using BepInEx;
using Comfort.Common;
using EFT;
using UIFixes.Patches;
namespace UIFixes
{

2
R.cs
View File

@@ -657,6 +657,8 @@ namespace UIFixes
public static class RExtentensions
{
public static R.UIElement R(this UIElement value) => new R.UIElement(value);
public static R.UIInputNode R(this UIInputNode value) => new R.UIInputNode(value);
public static R.ProductionPanel R(this ProductionPanel value) => new(value);
public static R.AreaScreenSubstrate R(this AreaScreenSubstrate value) => new(value);
public static R.ItemSpecificationPanel R(this ItemSpecificationPanel value) => new(value);