Switched flexItem slice to pointers.

This commit is contained in:
Oliver 2018-06-09 22:16:38 +02:00
parent 0ebcb1ed99
commit 1ee0c559cc
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ type Flex struct {
*Box
// The items to be positioned.
items []flexItem
items []*flexItem
// FlexRow or FlexColumn.
direction int
@ -86,7 +86,7 @@ func (f *Flex) SetFullScreen(fullScreen bool) *Flex {
// You can provide a nil value for the primitive. This will still consume screen
// space but nothing will be drawn.
func (f *Flex) AddItem(item Primitive, fixedSize, proportion int, focus bool) *Flex {
f.items = append(f.items, flexItem{Item: item, FixedSize: fixedSize, Proportion: proportion, Focus: focus})
f.items = append(f.items, &flexItem{Item: item, FixedSize: fixedSize, Proportion: proportion, Focus: focus})
return f
}