ImGui
Build script windows with labels, buttons, sliders, and other controls. Window methods return the window for chaining; interaction callbacks receive the values chosen by the user.
Functions
imgui.createCreate a window that can contain labels, controls, and layout elements. Use it to build a small settings panel or interactive tool. Store the returned window so callbacks can add controls or close it.
imgui.setvsyncSet the ImGui vertical-synchronization preference. This currently stores the UI preference without changing the rendering loop. Do not use it as an FPS limiter; setfpscap is the separate cap API.
ImGuiWindow:ButtonAdd a button and run a callback when it is activated. Use it for an action the user explicitly starts, such as saving the current settings. The callback runs on activation, not when the button is added.
ImGuiWindow:CheckboxAdd a checkbox with an initial checked state and a change callback. Use it for an on/off setting. Keep the new callback value in your own settings table if other code needs it.
ImGuiWindow:CollapsingHeaderCreate a collapsible content group and populate it through a callback. Use it to keep optional settings together without filling the entire window. Add that group’s controls inside the content callback.
ImGuiWindow:ColorPickerAdd controls for editing an initial RGBA color. Use it to let the user edit a color and its alpha together. Store all four callback values when the setting needs to be saved.
ImGuiWindow:destroyDestroy 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.
ImGuiWindow:InputTextAdd a text input and receive submitted text in a callback. Use it for a name, label, or other short text setting. The callback receives the submitted contents rather than a control handle.
ImGuiWindow:SameLinePlace the next item on the same line as the preceding item. Use it to arrange a compact row of related items, such as two action buttons. Call it before adding the item that should share the row.
ImGuiWindow:SeparatorInsert a visual separator between groups of controls. Use it to make groups of related controls easier to scan. It only adds a divider; it does not create a collapsible group.
ImGuiWindow:SliderFloatAdd a control for entering numeric values within a range. Use it for a fractional setting such as scale or opacity. Kawaii currently renders this as a numeric text input that clamps submitted values to the range.
ImGuiWindow:SliderIntAdd a control for entering integer values within a range. Use it for a whole-number setting such as an item count. Kawaii currently renders a numeric text input, clamps to the range, and floors the submitted value.
ImGuiWindow:TextAdd a text label to the window. Use it for instructions, headings, or a short explanation beside interactive controls.