From dfe3bc4bbada3163ec1255e2672e58296e2e7e4d Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Sun, 28 Dec 2025 17:45:54 -0600 Subject: [PATCH] Signed-off-by: Matt Bruce --- .../Baccarat/Views/Game/GameTableView.swift | 40 +++++++++++-------- .../Blackjack/Views/Game/GameTableView.swift | 2 + 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/Baccarat/Baccarat/Views/Game/GameTableView.swift b/Baccarat/Baccarat/Views/Game/GameTableView.swift index 6ce3b1e..0443371 100644 --- a/Baccarat/Baccarat/Views/Game/GameTableView.swift +++ b/Baccarat/Baccarat/Views/Game/GameTableView.swift @@ -226,14 +226,17 @@ struct GameTableView: View { Spacer(minLength: Design.Spacing.xSmall) - // Chip selector - full width so all chips are tappable - ChipSelectorView( - selectedChip: $selectedChip, - balance: state.balance, - currentBet: state.totalBetAmount, - maxBet: state.maxBet - ) - .debugBorder(showDebugBorders, color: .pink, label: "ChipSelector") + // Chip selector - only shown during betting phase + if state.currentPhase == .betting && !state.showResultBanner { + ChipSelectorView( + selectedChip: $selectedChip, + balance: state.balance, + currentBet: state.totalBetAmount, + maxBet: state.maxBet + ) + .transition(.opacity.combined(with: .move(edge: .bottom))) + .debugBorder(showDebugBorders, color: .pink, label: "ChipSelector") + } Spacer(minLength: Design.Spacing.xSmall) @@ -254,6 +257,7 @@ struct GameTableView: View { .debugBorder(showDebugBorders, color: .green, label: "ActionBtns") } .frame(maxWidth: .infinity) + .animation(.easeInOut(duration: Design.Animation.quick), value: state.currentPhase) .debugBorder(showDebugBorders, color: .white, label: "GameContent") } } @@ -327,14 +331,17 @@ struct GameTableView: View { .debugBorder(showDebugBorders, color: .purple, label: "Hint") } - // Chip selector - full width so all chips are tappable - ChipSelectorView( - selectedChip: $selectedChip, - balance: state.balance, - currentBet: state.totalBetAmount, - maxBet: state.maxBet - ) - .debugBorder(showDebugBorders, color: .pink, label: "ChipSelector") + // Chip selector - only shown during betting phase + if state.currentPhase == .betting && !state.showResultBanner { + ChipSelectorView( + selectedChip: $selectedChip, + balance: state.balance, + currentBet: state.totalBetAmount, + maxBet: state.maxBet + ) + .transition(.opacity.combined(with: .move(edge: .bottom))) + .debugBorder(showDebugBorders, color: .pink, label: "ChipSelector") + } // Action buttons ActionButtonsView( @@ -352,6 +359,7 @@ struct GameTableView: View { .padding(.bottom, bottomPadding) .debugBorder(showDebugBorders, color: .green, label: "ActionBtns") } + .animation(.easeInOut(duration: Design.Animation.quick), value: state.currentPhase) .safeAreaPadding(.bottom) .debugBorder(showDebugBorders, color: .white, label: "MainContent") } diff --git a/Blackjack/Blackjack/Views/Game/GameTableView.swift b/Blackjack/Blackjack/Views/Game/GameTableView.swift index 722e2da..d9843b4 100644 --- a/Blackjack/Blackjack/Views/Game/GameTableView.swift +++ b/Blackjack/Blackjack/Views/Game/GameTableView.swift @@ -156,6 +156,7 @@ struct GameTableView: View { currentBet: state.minBetForChipSelector, maxBet: state.settings.maxBet ) + .transition(.opacity.combined(with: .move(edge: .bottom))) .debugBorder(showDebugBorders, color: .pink, label: "ChipSelector") } @@ -166,6 +167,7 @@ struct GameTableView: View { .debugBorder(showDebugBorders, color: .blue, label: "ActionBtns") } .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top) + .animation(.easeInOut(duration: Design.Animation.quick), value: state.currentPhase) .zIndex(1) .onChange(of: state.currentPhase) { oldPhase, newPhase in Design.debugLog("🔄 Phase changed: \(oldPhase) → \(newPhase)")