Skip to content

Commit 822a0c3

Browse files
author
Achyut Kumar M
committed
add choice text to enlarged image
1 parent 3f50b70 commit 822a0c3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

GoInfoGame/GoInfoGame/quests/LongQuests/Components/LongFormImageView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ struct LongFormImageView: View {
3131

3232
if let label = label {
3333
Text(label)
34-
// system bold font of size 14
3534
.font(.system(size: 15, weight: .bold))
3635
.foregroundColor(Color.white)
3736
.padding(.bottom, 8)

GoInfoGame/GoInfoGame/quests/LongQuests/Components/QuestOptions.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ struct QuestOptions: View {
3030
@State private var expandedImageId: UUID? = nil
3131

3232
@State private var selectedImageURL: String? = nil
33+
34+
@State private var selectedImageText: String? = nil
3335

3436
var body: some View {
3537

@@ -49,6 +51,10 @@ struct QuestOptions: View {
4951
width: 300,
5052
height: 300
5153
)
54+
Text(selectedImageText ?? "")
55+
.font(.system(size: 15, weight: .bold))
56+
.foregroundColor(Color.black)
57+
.padding(.bottom, 8)
5258
Spacer()
5359
Button("Close") {
5460
selectedImageURL = nil
@@ -79,6 +85,8 @@ struct QuestOptions: View {
7985
)
8086
.onLongPressGesture {
8187
selectedImageURL = imageUrl
88+
selectedImageText = option.choiceText
89+
8290
}
8391
} else {
8492
ZStack {

0 commit comments

Comments
 (0)