Make app switcher disappear when opening album
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -168,11 +168,11 @@ namespace UI.CardSystem
|
|||||||
// If album exits while in Overworld, show AppSwitcher. If not, keep it hidden.
|
// If album exits while in Overworld, show AppSwitcher. If not, keep it hidden.
|
||||||
if (PlayerHudManager.Instance.currentUIMode == PlayerHudManager.UIMode.Overworld)
|
if (PlayerHudManager.Instance.currentUIMode == PlayerHudManager.UIMode.Overworld)
|
||||||
{
|
{
|
||||||
PlayerHudManager.Instance.appSwitcher.SetActive(true);
|
PlayerHudManager.Instance.ToggleAppSwitcher(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PlayerHudManager.Instance.appSwitcher.SetActive(false);
|
PlayerHudManager.Instance.ToggleAppSwitcher(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,12 +45,14 @@ namespace UI.CardSystem
|
|||||||
{
|
{
|
||||||
openAlbumButton.onClick.RemoveListener(OnOpenAlbumClicked);
|
openAlbumButton.onClick.RemoveListener(OnOpenAlbumClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug.Log("ALBUM: CardAlbumDestroyed");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnOpenAlbumClicked()
|
private void OnOpenAlbumClicked()
|
||||||
{
|
{
|
||||||
if (UIPageController.Instance == null) return;
|
if (UIPageController.Instance == null) return;
|
||||||
|
|
||||||
// Check if we're currently on the booster opening page
|
// Check if we're currently on the booster opening page
|
||||||
if (UIPageController.Instance.CurrentPage == boosterOpeningPage)
|
if (UIPageController.Instance.CurrentPage == boosterOpeningPage)
|
||||||
{
|
{
|
||||||
@@ -71,6 +73,7 @@ namespace UI.CardSystem
|
|||||||
PlayerHudManager.Instance.appSwitcher.SetActive(false);
|
PlayerHudManager.Instance.appSwitcher.SetActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
PlayerHudManager.Instance.ToggleAppSwitcher(false);
|
||||||
// If we're already on the album main page, do nothing
|
// If we're already on the album main page, do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public class PlayerHudManager : ManagedBehaviour
|
|||||||
|
|
||||||
public void UpdateUIMode(UIMode mode)
|
public void UpdateUIMode(UIMode mode)
|
||||||
{
|
{
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case UIMode.Overworld:
|
case UIMode.Overworld:
|
||||||
// Update currentUIMode var
|
// Update currentUIMode var
|
||||||
@@ -144,6 +144,11 @@ public class PlayerHudManager : ManagedBehaviour
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ToggleAppSwitcher(bool boo)
|
||||||
|
{
|
||||||
|
appSwitcher.SetActive(boo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user