Cleanup
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using BepInEx;
|
||||
using Comfort.Common;
|
||||
using EFT;
|
||||
using UIFixes.Patches;
|
||||
|
||||
namespace UIFixes
|
||||
{
|
||||
|
||||
2
R.cs
2
R.cs
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user