Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2025-12-28 17:45:54 -06:00
parent 9fee5c4ff9
commit dfe3bc4bba
2 changed files with 26 additions and 16 deletions

View File

@ -226,14 +226,17 @@ struct GameTableView: View {
Spacer(minLength: Design.Spacing.xSmall) Spacer(minLength: Design.Spacing.xSmall)
// Chip selector - full width so all chips are tappable // Chip selector - only shown during betting phase
ChipSelectorView( if state.currentPhase == .betting && !state.showResultBanner {
selectedChip: $selectedChip, ChipSelectorView(
balance: state.balance, selectedChip: $selectedChip,
currentBet: state.totalBetAmount, balance: state.balance,
maxBet: state.maxBet currentBet: state.totalBetAmount,
) maxBet: state.maxBet
.debugBorder(showDebugBorders, color: .pink, label: "ChipSelector") )
.transition(.opacity.combined(with: .move(edge: .bottom)))
.debugBorder(showDebugBorders, color: .pink, label: "ChipSelector")
}
Spacer(minLength: Design.Spacing.xSmall) Spacer(minLength: Design.Spacing.xSmall)
@ -254,6 +257,7 @@ struct GameTableView: View {
.debugBorder(showDebugBorders, color: .green, label: "ActionBtns") .debugBorder(showDebugBorders, color: .green, label: "ActionBtns")
} }
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.animation(.easeInOut(duration: Design.Animation.quick), value: state.currentPhase)
.debugBorder(showDebugBorders, color: .white, label: "GameContent") .debugBorder(showDebugBorders, color: .white, label: "GameContent")
} }
} }
@ -327,14 +331,17 @@ struct GameTableView: View {
.debugBorder(showDebugBorders, color: .purple, label: "Hint") .debugBorder(showDebugBorders, color: .purple, label: "Hint")
} }
// Chip selector - full width so all chips are tappable // Chip selector - only shown during betting phase
ChipSelectorView( if state.currentPhase == .betting && !state.showResultBanner {
selectedChip: $selectedChip, ChipSelectorView(
balance: state.balance, selectedChip: $selectedChip,
currentBet: state.totalBetAmount, balance: state.balance,
maxBet: state.maxBet currentBet: state.totalBetAmount,
) maxBet: state.maxBet
.debugBorder(showDebugBorders, color: .pink, label: "ChipSelector") )
.transition(.opacity.combined(with: .move(edge: .bottom)))
.debugBorder(showDebugBorders, color: .pink, label: "ChipSelector")
}
// Action buttons // Action buttons
ActionButtonsView( ActionButtonsView(
@ -352,6 +359,7 @@ struct GameTableView: View {
.padding(.bottom, bottomPadding) .padding(.bottom, bottomPadding)
.debugBorder(showDebugBorders, color: .green, label: "ActionBtns") .debugBorder(showDebugBorders, color: .green, label: "ActionBtns")
} }
.animation(.easeInOut(duration: Design.Animation.quick), value: state.currentPhase)
.safeAreaPadding(.bottom) .safeAreaPadding(.bottom)
.debugBorder(showDebugBorders, color: .white, label: "MainContent") .debugBorder(showDebugBorders, color: .white, label: "MainContent")
} }

View File

@ -156,6 +156,7 @@ struct GameTableView: View {
currentBet: state.minBetForChipSelector, currentBet: state.minBetForChipSelector,
maxBet: state.settings.maxBet maxBet: state.settings.maxBet
) )
.transition(.opacity.combined(with: .move(edge: .bottom)))
.debugBorder(showDebugBorders, color: .pink, label: "ChipSelector") .debugBorder(showDebugBorders, color: .pink, label: "ChipSelector")
} }
@ -166,6 +167,7 @@ struct GameTableView: View {
.debugBorder(showDebugBorders, color: .blue, label: "ActionBtns") .debugBorder(showDebugBorders, color: .blue, label: "ActionBtns")
} }
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top) .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top)
.animation(.easeInOut(duration: Design.Animation.quick), value: state.currentPhase)
.zIndex(1) .zIndex(1)
.onChange(of: state.currentPhase) { oldPhase, newPhase in .onChange(of: state.currentPhase) { oldPhase, newPhase in
Design.debugLog("🔄 Phase changed: \(oldPhase)\(newPhase)") Design.debugLog("🔄 Phase changed: \(oldPhase)\(newPhase)")