Sets default capitalization of text fields to make sense.

This commit is contained in:
2021-03-24 15:40:44 -07:00
parent fc2c908043
commit ab6dfea689
8 changed files with 14 additions and 10 deletions

View File

@@ -30,7 +30,6 @@ struct EditAbilityScores: View {
label: "CHA",
value: $monsterViewModel.charismaScore)
}
.textCase(nil)
}
}

View File

@@ -31,8 +31,8 @@ struct EditArmor: View {
MCTextField(
label: "Custom Armor",
value: $monsterViewModel.customArmor)
.autocapitalization(.none)
}
.textCase(nil)
}
}

View File

@@ -17,26 +17,31 @@ 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(
@@ -52,9 +57,8 @@ struct EditBasicInfo: View {
MCTextField(
label: "Custom HP",
value: $monsterViewModel.customHP)
.autocapitalization(.none)
}
.textCase(nil)
}
}

View File

@@ -21,6 +21,7 @@ struct EditDamageTypes: View {
set: {damageType.name = $0}
)
)
.autocapitalization(.none)
}
.onDelete(perform: { indexSet in
for index in indexSet {

View File

@@ -67,7 +67,6 @@ struct EditSavingThrows: View {
value: $monsterViewModel.charismaSavingThrowProficiency)
}
}
.textCase(nil)
}
}

View File

@@ -15,6 +15,7 @@ struct EditSkill: View {
MCTextField(
label: "Name",
value: $skillViewModel.name)
.autocapitalization(.words)
MCAbilityScorePicker(
label: "Ability Score",

View File

@@ -61,7 +61,8 @@ struct EditSpeed: View {
MCTextField(
label: "Custom Speed",
value: $monsterViewModel.customSpeed)
}.textCase(nil)
.autocapitalization(.none)
}
}
}

View File

@@ -15,7 +15,6 @@ struct MCTextField: View {
Text(label)
.font(.caption2)
TextField(label, text: value)
.autocapitalization(/*@START_MENU_TOKEN@*/.none/*@END_MENU_TOKEN@*/)
}
}
}