This commit is contained in:
Hubert Mattusch 2024-02-06 18:07:28 +01:00
parent 8d5b903b1a
commit 1818d99caf

View File

@ -75,8 +75,11 @@ namespace NEG.UI.UnityUi
base.UpdatePopupsState(forceShow, priority, data);
if(inputModule.CurrentSelectionSource != SelectionSource.Direction)
return;
if (CurrentPopup == null && (EventSystem.current.currentSelectedGameObject != null || !EventSystem.current.currentSelectedGameObject.activeInHierarchy))
if (CurrentPopup == null && (EventSystem.current.currentSelectedGameObject == null || !EventSystem.current.currentSelectedGameObject.activeInHierarchy))
{
if(((MonoWindow)CurrentMainWindow).DefaultSelectedItem == null)
return;
EventSystem.current.SetSelectedGameObject(((MonoWindow)CurrentMainWindow).DefaultSelectedItem);
}
}