Scroll now has a constructor similar to Cell

This commit is contained in:
2023-04-17 02:13:21 -04:00
parent 5ca3b80e8e
commit 427b5e025d
5 changed files with 8 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ type Scroll struct {
theme theme.Wrapped
}
func NewScroll (horizontal, vertical bool) (element *Scroll) {
func NewScroll (child tomo.Scrollable, horizontal, vertical bool) (element *Scroll) {
element = &Scroll { }
element.theme.Case = tomo.C("tomo", "scroll")
element.entity = tomo.NewEntity(element).(tomo.ContainerEntity)
@@ -51,6 +51,8 @@ func NewScroll (horizontal, vertical bool) (element *Scroll) {
})
element.entity.Adopt(element.vertical)
}
element.Adopt(child)
return
}