Moves editing armor to a sub view of EditMonster.

This commit is contained in:
2021-03-21 14:22:30 -07:00
parent 9f0896943f
commit b83a88c1f2
3 changed files with 49 additions and 23 deletions

View File

@@ -21,29 +21,7 @@ struct EditMonster: View {
var body: some View {
List {
NavigationLink("Basic Info", destination: EditBasicInfo(monsterViewModel: monsterViewModel))
Section(header: Text("Armor")) {
// Armor Type select bound to monster.armorTypeEnum
MCArmorTypePicker(
label: "Armor Type",
value: $monsterViewModel.armorType)
// Toggle bound to monster.hasShield?
Toggle(
"Has Shield",
isOn: $monsterViewModel.hasShield)
// Number with -/+ buttons bound to monster.naturalArmorBonus
MCStepperField(
label: "Natural Armor Bonus",
value: $monsterViewModel.naturalArmorBonus)
// Editable Text field bound to monster.customArmorText?
MCTextField(
label: "Custom Armor",
value: $monsterViewModel.customArmor)
}
.textCase(nil)
NavigationLink("Armor", destination: EditArmor(monsterViewModel: monsterViewModel))
Section(header: Text("Speed")) {
// Number bound to monster.baseSpeed