Fix input issues

This commit is contained in:
Michal Adam Pikulski
2025-10-21 15:58:13 +02:00
parent 00f6d2c6c6
commit 3aed47b183
6 changed files with 239 additions and 107 deletions

View File

@@ -1,6 +1,7 @@
using AppleHills.Data.CardSystem;
using Core;
using Data.CardSystem;
using Input;
using Pixelplacement;
using UI.Core;
using UnityEngine;
@@ -144,6 +145,10 @@ namespace UI.CardSystem
if (notificationSound != null)
notificationSound.Play();
// Eat input so the characters don't walk around
var backpackInput = backpackIcon.gameObject.GetComponentInParent<BackpackInput>();
InputManager.Instance.RegisterOverrideConsumer(backpackInput);
// If no pages are open, push the main menu
if (_pageController.CurrentPage == null)
{
@@ -177,6 +182,8 @@ namespace UI.CardSystem
if (newPage == null)
{
ShowOnlyBackpackIcon();
var backpackInput = backpackIcon.gameObject.GetComponentInParent<BackpackInput>();
InputManager.Instance.UnregisterOverrideConsumer(backpackInput);
}
else
{