Disable scroll when in a textbox

This commit is contained in:
Tyfon
2024-07-26 00:54:24 -07:00
parent 887688d7aa
commit 476b14f9a0

View File

@@ -8,6 +8,7 @@ using SPT.Reflection.Patching;
using System;
using System.Collections.Generic;
using System.Reflection;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
@@ -34,6 +35,12 @@ public static class ScrollPatches
private static bool HandleInput(ScrollRect scrollRect)
{
if (EventSystem.current?.currentSelectedGameObject != null &&
EventSystem.current.currentSelectedGameObject.GetComponent<TMP_InputField>() != null)
{
return false;
}
if (scrollRect != null)
{
if (Settings.UseHomeEnd.Value)