Skip to content

Commit

Permalink
Merge pull request #3 from mcred/develop
Browse files Browse the repository at this point in the history
Add Rose and Character IDs
  • Loading branch information
mcred authored Feb 14, 2020
2 parents 8a8b6b2 + b063b0d commit bb27fa8
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 3 deletions.
1 change: 1 addition & 0 deletions internal/app/characters/Character.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package characters

type Character struct {
ID int
XP Attribute
HP Attribute
Weapon Attribute
Expand Down
1 change: 1 addition & 0 deletions internal/app/characters/Dart.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
1 change: 1 addition & 0 deletions internal/app/characters/Lavitz.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
14 changes: 14 additions & 0 deletions internal/app/characters/Rose.go
Original file line number Diff line number Diff line change
@@ -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},
}
}
1 change: 1 addition & 0 deletions internal/app/characters/Shana.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
20 changes: 17 additions & 3 deletions internal/app/ui/Form.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit bb27fa8

Please sign in to comment.