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

This commit is contained in:
Matt Bruce 2025-12-17 16:49:01 -06:00
parent 1b6401f468
commit 4dda80a900
6 changed files with 94 additions and 44 deletions

View File

@ -504,6 +504,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = Blackjack/Blackjack.entitlements; CODE_SIGN_ENTITLEMENTS = Blackjack/Blackjack.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
@ -537,6 +538,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = Blackjack/Blackjack.entitlements; CODE_SIGN_ENTITLEMENTS = Blackjack/Blackjack.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;

View File

@ -725,10 +725,6 @@
"comment" : "Accessibility label for the dealer hand when there are no cards visible.", "comment" : "Accessibility label for the dealer hand when there are no cards visible.",
"isCommentAutoGenerated" : true "isCommentAutoGenerated" : true
}, },
"deck" : {
"comment" : "A unit of measurement for a playing card deck.",
"isCommentAutoGenerated" : true
},
"DECK SETTINGS" : { "DECK SETTINGS" : {
"localizations" : { "localizations" : {
"en" : { "en" : {
@ -751,10 +747,6 @@
} }
} }
}, },
"decks" : {
"comment" : "The plural form of \"deck\".",
"isCommentAutoGenerated" : true
},
"DISPLAY" : { "DISPLAY" : {
"localizations" : { "localizations" : {
"en" : { "en" : {

View File

@ -51,6 +51,9 @@ enum Design {
// Blackjack-specific // Blackjack-specific
static let tableHeight: CGFloat = 280 static let tableHeight: CGFloat = 280
// Settings - use CasinoDesign values
static let checkmark: CGFloat = CasinoDesign.Size.checkmark
} }
} }

View File

@ -201,9 +201,9 @@ struct PlayerHandsView: View {
case 1, 2: case 1, 2:
return cardWidth return cardWidth
case 3: case 3:
return cardWidth * 0.85 return cardWidth * 0.90
default: // 4+ hands default: // 4+ hands
return cardWidth * 0.75 return cardWidth * 0.85
} }
} }

View File

@ -172,11 +172,11 @@ struct GameStylePicker: View {
HStack { HStack {
VStack(alignment: .leading, spacing: Design.Spacing.xxSmall) { VStack(alignment: .leading, spacing: Design.Spacing.xxSmall) {
Text(style.displayName) Text(style.displayName)
.font(.system(size: Design.BaseFontSize.body, weight: .medium)) .font(.system(size: Design.BaseFontSize.large, weight: .semibold))
.foregroundStyle(.white) .foregroundStyle(.white)
Text(style.description) Text(style.description)
.font(.system(size: Design.BaseFontSize.small)) .font(.system(size: Design.BaseFontSize.body))
.foregroundStyle(.white.opacity(Design.Opacity.medium)) .foregroundStyle(.white.opacity(Design.Opacity.medium))
.lineLimit(2) .lineLimit(2)
} }
@ -185,16 +185,28 @@ struct GameStylePicker: View {
if selection == style { if selection == style {
Image(systemName: "checkmark.circle.fill") Image(systemName: "checkmark.circle.fill")
.font(.system(size: Design.Size.checkmark))
.foregroundStyle(Color.Settings.accent) .foregroundStyle(Color.Settings.accent)
} else {
Circle()
.strokeBorder(Color.white.opacity(Design.Opacity.light), lineWidth: Design.LineWidth.medium)
.frame(width: Design.Size.checkmark, height: Design.Size.checkmark)
} }
} }
.padding(.vertical, Design.Spacing.small) .padding()
.background(
RoundedRectangle(cornerRadius: Design.CornerRadius.medium)
.fill(selection == style ? Color.Settings.accent.opacity(Design.Opacity.subtle) : Color.clear)
)
.overlay(
RoundedRectangle(cornerRadius: Design.CornerRadius.medium)
.strokeBorder(
selection == style ? Color.Settings.accent.opacity(Design.Opacity.medium) : Color.white.opacity(Design.Opacity.subtle),
lineWidth: Design.LineWidth.thin
)
)
} }
.buttonStyle(.plain) .buttonStyle(.plain)
if style != BlackjackStyle.allCases.last {
Divider().background(Color.white.opacity(Design.Opacity.hint))
}
} }
} }
} }
@ -206,27 +218,45 @@ struct DeckCountPicker: View {
@Binding var selection: DeckCount @Binding var selection: DeckCount
var body: some View { var body: some View {
LazyVGrid(columns: [ VStack(spacing: Design.Spacing.medium) {
GridItem(.flexible()),
GridItem(.flexible()),
GridItem(.flexible())
], spacing: Design.Spacing.small) {
ForEach(DeckCount.allCases) { count in ForEach(DeckCount.allCases) { count in
Button { Button {
selection = count selection = count
} label: { } label: {
VStack(spacing: Design.Spacing.xxSmall) { HStack {
Text("\(count.rawValue)") VStack(alignment: .leading, spacing: Design.Spacing.xxSmall) {
.font(.system(size: Design.BaseFontSize.xLarge, weight: .bold)) Text(count.displayName)
Text(count.rawValue == 1 ? "deck" : "decks") .font(.system(size: Design.BaseFontSize.large, weight: .semibold))
.font(.system(size: Design.BaseFontSize.xSmall)) .foregroundStyle(.white)
Text(count.description)
.font(.system(size: Design.BaseFontSize.body))
.foregroundStyle(.white.opacity(Design.Opacity.medium))
} }
.foregroundStyle(selection == count ? .black : .white)
.frame(maxWidth: .infinity) Spacer()
.padding(.vertical, Design.Spacing.medium)
if selection == count {
Image(systemName: "checkmark.circle.fill")
.font(.system(size: Design.Size.checkmark))
.foregroundStyle(Color.Settings.accent)
} else {
Circle()
.strokeBorder(Color.white.opacity(Design.Opacity.light), lineWidth: Design.LineWidth.medium)
.frame(width: Design.Size.checkmark, height: Design.Size.checkmark)
}
}
.padding()
.background( .background(
RoundedRectangle(cornerRadius: Design.CornerRadius.small) RoundedRectangle(cornerRadius: Design.CornerRadius.medium)
.fill(selection == count ? Color.Settings.accent : Color.white.opacity(Design.Opacity.subtle)) .fill(selection == count ? Color.Settings.accent.opacity(Design.Opacity.subtle) : Color.clear)
)
.overlay(
RoundedRectangle(cornerRadius: Design.CornerRadius.medium)
.strokeBorder(
selection == count ? Color.Settings.accent.opacity(Design.Opacity.medium) : Color.white.opacity(Design.Opacity.subtle),
lineWidth: Design.LineWidth.thin
)
) )
} }
.buttonStyle(.plain) .buttonStyle(.plain)
@ -249,28 +279,51 @@ struct TableLimitsPicker: View {
HStack { HStack {
VStack(alignment: .leading, spacing: Design.Spacing.xxSmall) { VStack(alignment: .leading, spacing: Design.Spacing.xxSmall) {
Text(limit.displayName) Text(limit.displayName)
.font(.system(size: Design.BaseFontSize.body, weight: .medium)) .font(.system(size: Design.BaseFontSize.large, weight: .semibold))
.foregroundStyle(.white) .foregroundStyle(.white)
Text(limit.description) Text(limit.detailedDescription)
.font(.system(size: Design.BaseFontSize.small)) .font(.system(size: Design.BaseFontSize.body))
.foregroundStyle(.white.opacity(Design.Opacity.medium)) .foregroundStyle(.white.opacity(Design.Opacity.medium))
} }
Spacer() Spacer()
// Limits badge pill
Text(limit.description)
.font(.system(size: Design.BaseFontSize.body, weight: .bold, design: .rounded))
.foregroundStyle(selection == limit ? .black : Color.Settings.accent)
.padding(.horizontal, Design.Spacing.small)
.padding(.vertical, Design.Spacing.xSmall)
.background(
Capsule()
.fill(selection == limit ? Color.Settings.accent : Color.Settings.accent.opacity(Design.Opacity.hint))
)
if selection == limit { if selection == limit {
Image(systemName: "checkmark.circle.fill") Image(systemName: "checkmark.circle.fill")
.font(.system(size: Design.Size.checkmark - 2))
.foregroundStyle(Color.Settings.accent) .foregroundStyle(Color.Settings.accent)
} else {
Circle()
.strokeBorder(Color.white.opacity(Design.Opacity.light), lineWidth: Design.LineWidth.medium)
.frame(width: Design.Size.checkmark - 2, height: Design.Size.checkmark - 2)
} }
} }
.padding(.vertical, Design.Spacing.small) .padding()
.background(
RoundedRectangle(cornerRadius: Design.CornerRadius.medium)
.fill(selection == limit ? Color.Settings.accent.opacity(Design.Opacity.subtle) : Color.clear)
)
.overlay(
RoundedRectangle(cornerRadius: Design.CornerRadius.medium)
.strokeBorder(
selection == limit ? Color.Settings.accent.opacity(Design.Opacity.medium) : Color.white.opacity(Design.Opacity.subtle),
lineWidth: Design.LineWidth.thin
)
)
} }
.buttonStyle(.plain) .buttonStyle(.plain)
if limit != TableLimits.allCases.last {
Divider().background(Color.white.opacity(Design.Opacity.hint))
}
} }
} }
} }

View File

@ -104,10 +104,10 @@ public enum CasinoDesign {
public static let chipLarge: CGFloat = 60 public static let chipLarge: CGFloat = 60
/// Default card widths. /// Default card widths.
public static let cardWidthSmall: CGFloat = 45 public static let cardWidthSmall: CGFloat = 55
public static let cardWidthMedium: CGFloat = 55 public static let cardWidthMedium: CGFloat = 65
public static let cardWidthLarge: CGFloat = 65 public static let cardWidthLarge: CGFloat = 74
public static let cardWidth: CGFloat = 70 public static let cardWidth: CGFloat = 80
/// Card overlap for stacking. /// Card overlap for stacking.
public static let cardOverlap: CGFloat = -15 public static let cardOverlap: CGFloat = -15