Skip to content
ForgeCastDocs

Windows

Open windows of your own.

Functions

Window:render(tree)

Show a new interface in the window.

Window:close()

Close this window.

Window:focus()

Bring this window to the front.

Window:set_title(title)

Change this window's title.

  • title: string

window.create(spec)

Open a window of your own.

Returns Window

local w = window.create{ title = "Counter", width = 300, height = 200 }
local n = 0
local function draw()
  w:render(ui.column{ ui.heading("Count: " .. n), ui.button("+1", function() n = n + 1 draw() end) })
end
draw()

window.close(key)

Close one of your windows.

  • key: string

window.focus(key)

Bring one of your windows to the front.

  • key: string

window.set_title(key, title)

Change a window's title.

  • key: string
  • title: string

Types

Open a type to see its fields; type names above link here.

On this page