Window API

Every option Ember.new accepts, and every method a window has.

Ember.new#

Luau
local win = Ember.new({ Title = "My Script" })

Everything is optional.

Identity#

OptionTypeDefaultWhat it does
TitlestringShown in the title bar.
SubtitlestringA smaller second line under the title.
IconstringAn icon name shown next to the title.
IconColorColor3Overrides that icon's colour.
NamestringInternal name for the ScreenGui.
FooterstringSmall text at the bottom of the rail.
AccentColor3Overrides the theme's accent for this window only.

Geometry#

OptionTypeDefaultWhat it does
SizeVector2Vector2.new(700, 452)Starting size.
MinSizeVector2Vector2.new(560, 300)The user cannot resize below this.
MaxSizeVector2Upper limit. Defaults to the viewport.
PositionVector2 | UDim2Where it opens. Centred if unset.
Railnumber176Sidebar width in pixels.
MinRailnumber132Narrowest the sidebar can be dragged.
MaxRailnumber320Widest the sidebar can be dragged.
MinContentnumber300The content pane never shrinks past this.
ResizablebooleantrueWhether the resize grip is offered.
SafeAreabooleantrueKeeps the window inside the usable viewport.
SaveLayoutbooleanfalseRemember size, position and rail width between sessions.

Behaviour#

OptionTypeDefaultWhat it does
KeybindEnumItem | stringEnum.KeyCode.RightShiftThe key that hides and shows the window. A string like "F4" works too.
ReplaceExistingbooleantrueClose this script's previous window instead of stacking a second one.
SearchbooleanfalseAdds a search box to the rail that spans every section.
SearchPlaceholderstringGhost text for that box.
DurationnumberOverrides the open and close animation length.

Sections#

Luau
local main = win:Section("Main", "house")
 
-- with options
local big = win:Section("Everything", "list", {
    Search = true,
    SearchPlaceholder = "Filter this section…",
})

The first section created is the one shown on open.

Methods#

Content#

MethodWhat it does
Section(name, icon, opts)Adds a tab and returns its page
Select(section)Switches to a section
Notify(opts)Shows a notification
ThemeEditor(section)Drops the full theme editor into a section

Appearance#

MethodWhat it does
SetTitle(text)Changes the title
SetSubtitle(text)Changes the subtitle
SetSize(width, height)Resizes
SetMinSize(v) / SetMaxSize(v)Changes the resize limits
SetPosition(v)Moves it
SetRailWidth(n)Resizes the sidebar
Centre() / Center()Centres it on screen. Both spellings work.

State#

MethodWhat it does
Toggle()Hides or shows, with the dissolve
Minimise() / Minimize()Collapses to the title bar
SaveLayout()Writes the current geometry to disk
RestoreLayout()Reads it back
GetLayout()Returns the current geometry as a table

Lifecycle#

MethodWhat it does
Destroy()Tears the window down and disconnects everything
OnDestroy(fn)Registers cleanup to run on destroy
Track(connection)Hands a connection to the window to disconnect for you

See Lifecycle and cleanup.

A fully specified window#

Luau
local win = Ember.new({
    Title      = "Bloxburg Helper",
    Subtitle   = "v2.1",
    Icon       = "house",
    Footer     = "by you",
 
    Size       = Vector2.new(760, 500),
    MinSize    = Vector2.new(600, 340),
    Rail       = 190,
    SaveLayout = true,
 
    Keybind    = Enum.KeyCode.RightControl,
    Search     = true,
})