Sets default capitalization of text fields to make sense.
This commit is contained in:
@@ -29,8 +29,7 @@ struct EditAbilityScores: View {
|
||||
MCStepperField(
|
||||
label: "CHA",
|
||||
value: $monsterViewModel.charismaScore)
|
||||
}
|
||||
.textCase(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ struct EditArmor: View {
|
||||
MCTextField(
|
||||
label: "Custom Armor",
|
||||
value: $monsterViewModel.customArmor)
|
||||
.autocapitalization(.none)
|
||||
}
|
||||
.textCase(nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,27 +17,32 @@ struct EditBasicInfo: View {
|
||||
MCTextField(
|
||||
label: "Name",
|
||||
value: $monsterViewModel.name)
|
||||
.autocapitalization(.words)
|
||||
|
||||
// Editable Text field bound to monster.size
|
||||
MCTextField(
|
||||
label: "Size",
|
||||
value: $monsterViewModel.size)
|
||||
.autocapitalization(.words)
|
||||
|
||||
// Editable Text field bound to monster.type
|
||||
MCTextField(
|
||||
label: "Type",
|
||||
value: $monsterViewModel.type)
|
||||
.autocapitalization(.none)
|
||||
|
||||
// Editable Text field bound to monster.subType
|
||||
MCTextField(
|
||||
label: "Subtype",
|
||||
value: $monsterViewModel.subType)
|
||||
|
||||
.autocapitalization(.none)
|
||||
|
||||
// Editable Text field bound to monster.alignment
|
||||
MCTextField(
|
||||
label: "Alignment",
|
||||
value: $monsterViewModel.alignment)
|
||||
|
||||
.autocapitalization(.none)
|
||||
|
||||
// Number with -/+ buttons bound to monster.hitDice
|
||||
MCStepperField(
|
||||
label: "Hit Dice",
|
||||
@@ -52,9 +57,8 @@ struct EditBasicInfo: View {
|
||||
MCTextField(
|
||||
label: "Custom HP",
|
||||
value: $monsterViewModel.customHP)
|
||||
|
||||
.autocapitalization(.none)
|
||||
}
|
||||
.textCase(nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ struct EditDamageTypes: View {
|
||||
set: {damageType.name = $0}
|
||||
)
|
||||
)
|
||||
.autocapitalization(.none)
|
||||
}
|
||||
.onDelete(perform: { indexSet in
|
||||
for index in indexSet {
|
||||
|
||||
@@ -67,7 +67,6 @@ struct EditSavingThrows: View {
|
||||
value: $monsterViewModel.charismaSavingThrowProficiency)
|
||||
}
|
||||
}
|
||||
.textCase(nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ struct EditSkill: View {
|
||||
MCTextField(
|
||||
label: "Name",
|
||||
value: $skillViewModel.name)
|
||||
.autocapitalization(.words)
|
||||
|
||||
MCAbilityScorePicker(
|
||||
label: "Ability Score",
|
||||
|
||||
@@ -61,7 +61,8 @@ struct EditSpeed: View {
|
||||
MCTextField(
|
||||
label: "Custom Speed",
|
||||
value: $monsterViewModel.customSpeed)
|
||||
}.textCase(nil)
|
||||
.autocapitalization(.none)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ struct MCTextField: View {
|
||||
Text(label)
|
||||
.font(.caption2)
|
||||
TextField(label, text: value)
|
||||
.autocapitalization(/*@START_MENU_TOKEN@*/.none/*@END_MENU_TOKEN@*/)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user