Working pause menu re-worked with exlusive views

This commit is contained in:
Michal Pikulski
2025-10-24 10:41:27 +02:00
parent 7bb905eb6b
commit 1003c3f6ac
14 changed files with 878 additions and 116 deletions

View File

@@ -44,9 +44,6 @@ namespace UI.CardSystem
backpackButton.onClick.AddListener(OnBackpackButtonClicked);
}
// Initially show only the backpack icon
ShowOnlyBackpackIcon();
// Hide notification dot initially
if (boosterNotificationDot != null)
boosterNotificationDot.gameObject.SetActive(false);
@@ -57,6 +54,9 @@ namespace UI.CardSystem
private void InitializePostBoot()
{
// Initially show only the backpack icon
ShowOnlyBackpackIcon();
// Initialize pages and hide them
InitializePages();
}
@@ -142,10 +142,6 @@ 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);
PageController.PushPage(mainMenuPage);
// Clear notification for unseen cards when opening menu
@@ -159,6 +155,8 @@ namespace UI.CardSystem
{
backpackButton.gameObject.SetActive(false);
}
GameManager.Instance.RequestPause(this);
}
/// <summary>
@@ -170,8 +168,6 @@ namespace UI.CardSystem
if (newPage == null)
{
ShowOnlyBackpackIcon();
var backpackInput = backpackIcon.gameObject.GetComponentInParent<BackpackInput>();
InputManager.Instance.UnregisterOverrideConsumer(backpackInput);
}
else
{
@@ -225,6 +221,8 @@ namespace UI.CardSystem
boosterNotificationDot.gameObject.SetActive(hasBooters || _hasUnseenCards);
}
}
GameManager.Instance.ReleasePause(this);
}
/// <summary>