ImGuiWindow:destroy Synchronous

  • ImGuiWindow:Destroy

Destroy the window and its controls. Use it for final cleanup when the user closes your tool. Keep the window handle until then, and do not add more controls after destroying it.

Syntax
Luau
ImGuiWindow:destroy() -> ()

Parameters

Call this method with a ImGuiWindow receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.

This function takes no arguments.

Returns

()

This function returns no values.

Usage notes

Use the lowercase method name destroy.

Example

Example
Luau
local window = imgui.create("Example controls")
window:Text("This window closes when you press the button.")
window:Button("Close", function()
    window:destroy()
end)
Kawaii documentation