diff --git a/Assets/Scripts/UI/CardSystem/AlbumViewPage.cs b/Assets/Scripts/UI/CardSystem/AlbumViewPage.cs index 02c0ff5d..09845ce1 100644 --- a/Assets/Scripts/UI/CardSystem/AlbumViewPage.cs +++ b/Assets/Scripts/UI/CardSystem/AlbumViewPage.cs @@ -20,6 +20,12 @@ namespace AppleHills.UI.CardSystem [SerializeField] private GameObject cardSlotPrefab; [SerializeField] private GameObject cardPrefab; + [Header("Filter UI")] + [SerializeField] private Dropdown zoneFilterDropdown; + [SerializeField] private Dropdown rarityFilterDropdown; + [SerializeField] private Button resetFiltersButton; + [SerializeField] private CanvasGroup canvasGroup; + // Runtime references private CardSystemManager _cardManager; private List _displayedCards = new List(); @@ -32,6 +38,12 @@ namespace AppleHills.UI.CardSystem private void Awake() { _cardManager = CardSystemManager.Instance; + + // Make sure we have a CanvasGroup for transitions + if (canvasGroup == null) + canvasGroup = GetComponent(); + if (canvasGroup == null) + canvasGroup = gameObject.AddComponent(); } /// @@ -53,6 +65,9 @@ namespace AppleHills.UI.CardSystem // Clear any previous setup ClearAlbum(); + // Setup filter UI + InitializeFilters(); + // Get all collected cards List collectedCards = _cardManager.GetAllCollectedCards(); @@ -160,28 +175,15 @@ namespace AppleHills.UI.CardSystem /// private void SetupCardDragHandlers(CardUIElement cardUI) { - // // Get drag handler component (you might need to implement this) - // DragHandler dragHandler = cardUI.GetComponent(); - // if (dragHandler == null) - // { - // // This is a stub for the drag handler - // // In a real implementation, you'd have a proper drag handler component - // // For now, we'll just add click listeners - // - // // Add click listener - // Button cardButton = cardUI.GetComponent