Enoria
  • Home
  • Guide
    • Getting Started
    • Hello world!
    • Widgets
      • Container
      • Column
      • Row
      • Form
      • GridBuilder
      • ListBuilder
      • TextLabel
      • TextButton
      • ImageLabel
      • ImageButton
      • PageLayout
      • ScrollContainer
      • Stack
      • TextBox
      • TextFormField
      • VerticalSpacer
      • HorizontalSpacer
      • Viewport
  • Events
  • State Management
    • Stores
    • Observer
  • Animations
  • Build forms with validation
  • Theming
    • Classes
Powered by GitBook
On this page

Was this helpful?

  1. Guide
  2. Widgets

GridBuilder

If your need to display a grid of a large or infinite number of items (a list of items fetched from API, for instance) then you should use GridBuilder.

The builder function that you provide is called only for those items that are actually visible so your game performance will be improved.

Example

...
local Items = {"First item", "Second item", "Third item"}
...
e.GridBuilder(#Items, function(index)
	return e.TextLabel(Items[index])
end)
PreviousFormNextListBuilder

Last updated 4 years ago

Was this helpful?