diff --git a/internal/app/characters/Character.go b/internal/app/characters/Character.go index b37e9db..7300129 100644 --- a/internal/app/characters/Character.go +++ b/internal/app/characters/Character.go @@ -1,6 +1,7 @@ package characters type Character struct { + ID int XP Attribute HP Attribute Weapon Attribute diff --git a/internal/app/characters/Dart.go b/internal/app/characters/Dart.go index 7528e5c..10adbea 100644 --- a/internal/app/characters/Dart.go +++ b/internal/app/characters/Dart.go @@ -2,6 +2,7 @@ package characters func Dart() Character { return Character{ + ID: 0, XP: Attribute{0x52C,4,true}, HP: Attribute{0x534,2,true}, Weapon: Attribute{0x540,1,false}, diff --git a/internal/app/characters/Lavitz.go b/internal/app/characters/Lavitz.go index af0a432..6103c9d 100644 --- a/internal/app/characters/Lavitz.go +++ b/internal/app/characters/Lavitz.go @@ -2,6 +2,7 @@ package characters func Lavitz() Character { return Character{ + ID: 1, XP: Attribute{0x584,4,true}, HP: Attribute{0x534,2,true}, //TODO map this Weapon: Attribute{0x56C,1,false}, diff --git a/internal/app/characters/Rose.go b/internal/app/characters/Rose.go new file mode 100644 index 0000000..888157e --- /dev/null +++ b/internal/app/characters/Rose.go @@ -0,0 +1,14 @@ +package characters + +func Rose() Character { + return Character{ + ID: 3, + XP: Attribute{0x5B0,4,true}, + HP: Attribute{0x5B8,2,true}, + Weapon: Attribute{0x5C4,1,false}, + Helmet: Attribute{0x5C5,1,false}, + Chest: Attribute{0x5C6,1,false}, + Boots: Attribute{0x5C7,1,false}, + Accessory: Attribute{0x5C8,1,false}, + } +} diff --git a/internal/app/characters/Shana.go b/internal/app/characters/Shana.go index 86ee051..f3c9aec 100644 --- a/internal/app/characters/Shana.go +++ b/internal/app/characters/Shana.go @@ -2,6 +2,7 @@ package characters func Shana() Character { return Character{ + ID: 2, XP: Attribute{0x558,4,true}, HP: Attribute{0x560,2,true}, Weapon: Attribute{0x598,1,false}, diff --git a/internal/app/ui/Form.go b/internal/app/ui/Form.go index 6ccd9a8..e11638c 100644 --- a/internal/app/ui/Form.go +++ b/internal/app/ui/Form.go @@ -71,9 +71,23 @@ func CharacterForm(slot *storage.Slot, card *storage.Card, w fyne.Window) *fyne. box3.Append(widget.NewLabel("Accessories")) box3.Append(createSelect(inventory.Accessories(), lavitz.Accessory, slot)) + rose := characters.Rose() box4 := widget.NewVBox() - box4.Append(form) + box4.Append(widget.NewLabel("Rose")) + box4.Append(widget.NewLabel("Weapon")) + box4.Append(createSelect(inventory.Daggers(), rose.Weapon, slot)) + box4.Append(widget.NewLabel("Armor")) + box4.Append(createSelect(inventory.Armor(), rose.Chest, slot)) + box4.Append(widget.NewLabel("Headgear")) + box4.Append(createSelect(inventory.Helms(), rose.Helmet, slot)) + box4.Append(widget.NewLabel("Boots")) + box4.Append(createSelect(inventory.Boots(), rose.Boots, slot)) + box4.Append(widget.NewLabel("Accessories")) + box4.Append(createSelect(inventory.Accessories(), rose.Accessory, slot)) - return fyne.NewContainerWithLayout(layout.NewGridLayout(3), - box1, box2, box3, box4) + box5 := widget.NewVBox() + box5.Append(form) + + return fyne.NewContainerWithLayout(layout.NewGridLayout(4), + box1, box2, box3, box4, box5) }