|
|
@ -28,7 +28,7 @@ type Flex struct {
|
|
|
|
*Box
|
|
|
|
*Box
|
|
|
|
|
|
|
|
|
|
|
|
// The items to be positioned.
|
|
|
|
// The items to be positioned.
|
|
|
|
items []flexItem
|
|
|
|
items []*flexItem
|
|
|
|
|
|
|
|
|
|
|
|
// FlexRow or FlexColumn.
|
|
|
|
// FlexRow or FlexColumn.
|
|
|
|
direction int
|
|
|
|
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
|
|
|
|
// You can provide a nil value for the primitive. This will still consume screen
|
|
|
|
// space but nothing will be drawn.
|
|
|
|
// space but nothing will be drawn.
|
|
|
|
func (f *Flex) AddItem(item Primitive, fixedSize, proportion int, focus bool) *Flex {
|
|
|
|
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
|
|
|
|
return f
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|