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