diff GeoQuiz/Models/UserDataModel.swift @ 27:3f4b366d476d

add flag layout settings
author Dennis C. M. <dennis@denniscm.com>
date Thu, 10 Nov 2022 09:26:48 +0100
parents 425078c01194
children 9d6dd0e59c22
line wrap: on
line diff
--- a/GeoQuiz/Models/UserDataModel.swift	Wed Nov 09 10:30:01 2022 +0100
+++ b/GeoQuiz/Models/UserDataModel.swift	Thu Nov 10 09:26:48 2022 +0100
@@ -14,6 +14,7 @@
     var haptics: Bool = true
     var sound: Bool = true
     var numberOfLives: Int = 25
+    var guessTheFlagShape: GuessTheFlagShape = .respectAspectRatio
     
     // Profile
     var username: String = "Unnamed"
@@ -24,3 +25,11 @@
         return UIImage(data: imageData)
     }
 }
+
+enum GuessTheFlagShape: String, Codable, CaseIterable {
+    case respectAspectRatio = "Original"
+    case circular = "Circular"
+    case rectangular = "Rectangular"
+    
+    var localizedName: LocalizedStringKey { LocalizedStringKey(rawValue) }
+}