ImGui

ImGuiWindow.destroy

Removes an ImGui window, releases its registered callbacks, and invalidates the handle.

Syntax

ImGuiWindow.destroy(window: ImGuiWindow)

Arguments

NameTypeDescription
windowImGuiWindowWindow returned by imgui.create.

Description

Removes an ImGui window, releases its registered callbacks, and invalidates the handle.

Call it with 1 parameter(s): window. The argument table explains which values are required and which ones only refine the behavior.

It does not return data. Treat the call as an action and handle errors around the call site when needed.

Example

Example call with placeholder values.

ImGuiWindow.destroy(nil)

Types

ImGuiWindow

Handle returned by imgui.create. Control-building methods return the same handle so calls can be chained.

Button (label: string, onClick: () -> ()) -> ImGuiWindow Appends a button and invokes the callback after a click.Checkbox (label: string, checked: boolean, onChange: (boolean) -> ()) -> ImGuiWindow Appends a checkbox initialized to the provided state.CollapsingHeader (label: string, content: (ImGuiWindow) -> ()) -> ImGuiWindow Groups controls appended by the content callback beneath a collapsing header.ColorPicker (label: string, red: number?, green: number?, blue: number?, alpha: number?, onChange: (number, number, number, number) -> ()) -> ImGuiWindow Appends an RGBA editor; omitted color components default to 1.0.InputText (label: string, text: string?, onChange: (string) -> ()) -> ImGuiWindow Appends a single-line text input; omitted initial text defaults to an empty string.SameLine () -> ImGuiWindow Places the next control on the same line.Separator () -> ImGuiWindow Appends a horizontal separator.SliderFloat (label: string, value: number, minimum: number, maximum: number, onChange: (number) -> ()) -> ImGuiWindow Appends a floating-point slider.SliderInt (label: string, value: integer, minimum: integer, maximum: integer, onChange: (number) -> ()) -> ImGuiWindow Appends an integer slider.Text (text: string) -> ImGuiWindow Appends non-interactive text.destroy () -> () Removes the window and releases its registered callbacks.