Groups and search
Collapsible containers, per-section filtering, and search that spans the whole window.
Groups#
A group is a container that opens and closes. Everything you put inside it goes away when it is shut.
local advanced = main:Group({ Text = "Advanced", Icon = "wrench", Open = false })
advanced:Toggle({ Text = "Debug logging" })
advanced:Slider({ Text = "Tick rate", Min = 1, Max = 60, Default = 30 })My Script
v1.0
A group has the same methods a section does, so anything you can add to a section you can add to a group.
| Option | Type | Default | What it does |
|---|---|---|---|
Textreq | string | — | The group's heading. |
Icon | string | — | An icon before the heading. |
Open | boolean | true | Whether it starts expanded. |
| Method | What it does |
|---|---|
SetOpen(state, animated) | Opens or closes it. Pass false as the second argument to skip the animation. |
IsOpen() | Whether it is currently open |
advanced:SetOpen(true) -- animates open
advanced:SetOpen(false, false) -- snaps shut, no animationControls inside a group render flat
A group draws its own surface, so the controls inside it drop theirs — one panel on an identical panel reads as a single flat slab. You do not have to do anything; it is automatic.
Per-section search#
Turn on a filter box for one section:
local big = win:Section("Everything", "list", {
Search = true,
SearchPlaceholder = "Filter this section…",
})Typing filters the controls in that section by their label and description. Groups whose contents all fail the filter hide themselves, so you never end up staring at an empty container.
Window-wide search#
The rail can carry its own search box that spans every section:
local win = Ember.new({
Title = "My Script",
Search = true,
})Matches are counted per section and shown next to each tab, so you can see where the hits are before switching. If the section you are on has no matches but another does, Ember moves you there.
This is off by default — most windows do not need it, and an empty search box in the rail is one more thing to explain.
Which to use#
| Situation | Reach for |
|---|---|
| One section with a lot of rows | Per-section Search |
| Many sections, user does not know where a setting lives | Window Search |
| A block of rarely-touched options | A Group, closed by default |
| Two or three related rows | A Title and a Separator |
They combine. A window with search, sections with groups, and groups that hide themselves when filtered out is the intended shape for a large script.