categorize

fun categorize(children: MutableList<Element>, drawables: MutableList<Drawable>, selectables: MutableList<Selectable>, other: Consumer<Widget> = Consumer { _-> })

Categorizes the elements in this layout into the three constituent components many screens/parents care about, as well as providing a method for arbitrary categorization

List of widgets -> List of elements, drawables, and selectables as applicable to each.

This method will recursively categorize elements from contained layouts.

Author

fzzyhmstrs

Since

0.6.0

Parameters

children

MutableList<Element> list to populate with each widget entry that is also an Element (most are)

drawables

MutableList<Drawable> list to populate with each widget entry that is also a Drawable (again, most are)

selectables

MutableList<Selectable> list to populate with each widget entry that is also a Selectable (surprise! most are)

other

Consumer<Widget> consumes each widget entry and can do whatever you want with them. In Fzzy Config this is usually used to categorize elements into more niche interfaces like TooltipChild