ImGui
Render callbacks, widgets, layouts, buffers and the exported ImGui enums.
- Frame callbacks and result timing
- Functions
- ImGui.OnRender
- ImGui.Begin
- ImGui.End
- ImGui.PushStyleColor
- ImGui.PopStyleColor
- ImGui.SameLine
- ImGui.PushID
- ImGui.PopID
- ImGui.SetNextWindowPos
- ImGui.SetNextWindowSize
- ImGui.GetWindowPos
- ImGui.GetWindowSize
- ImGui.Text
- ImGui.TextColored
- ImGui.TextDisabled
- ImGui.TextEx
- ImGui.TextWrapped
- ImGui.ArrowButton
- ImGui.ArrowButtonEx
- ImGui.Button
- ImGui.ButtonEx
- ImGui.ColorButton
- ImGui.ImageButton
- ImGui.InvisibleButton
- ImGui.RadioButton
- ImGui.SmallButton
- ImGui.TabItemButton
- ImGui.Checkbox
- ImGui.SliderAngle
- ImGui.SliderFloat
- ImGui.SliderInt
- ImGui.Combo
- ImGui.ColorPicker3
- ImGui.ColorPicker4
- ImGui.Selectable
- ImGui.StringBuffer
- ImGui.InputText
- ImGui.InputTextWithHint
- ImGui.CollapsingHeader
- ImGui.SetItemAllowOverlap
- ImGui.GetColorU32
- ImGui.BeginMenuBar
- ImGui.EndMenuBar
- ImGui.BeginMenu
- ImGui.EndMenu
- ImGui.MenuItem
- ImGui.Separator
- ImGui.IsItemClicked
- ImGui.TreeNode
- ImGui.TreeNodeEx
- ImGui.TreePop
- ImGui.Image
- ImGui.PushItemWidth
- ImGui.PopItemWidth
- ImGui.SetNextWindowSizeConstraints
- ImGui.SetScrollHereX
- ImGui.SetScrollHereY
- ImGui.BeginChild
- ImGui.EndChild
- ImGui.SetItemDefaultFocus
- ImGui.SetKeyboardFocusHere
- ImGui.BeginTooltip
- ImGui.BeginTooltipEx
- ImGui.BeginItemTooltip
- ImGui.BeginTooltipHidden
- ImGui.EndTooltip
- ImGui.BeginPopup
- ImGui.EndPopup
- ImGui.BeginCombo
- ImGui.EndCombo
- ImGui.BeginListBox
- ImGui.EndListBox
- ImGui.Indent
- ImGui.Unindent
- ImGui.GetCursorPos
- ImGui.SetCursorPos
- ImGui.SetVSync
- ImGui.IsItemHovered
- ImGui.IsItemActive
- ImGui.IsItemFocused
- ImGui.IsItemVisible
- ImGui.IsItemEdited
- ImGui.IsItemActivated
- ImGui.IsItemDeactivated
- ImGui.IsItemDeactivatedAfterEdit
- ImGui.IsAnyItemHovered
- ImGui.IsAnyItemActive
- ImGui.IsWindowHovered
- ImGui.IsWindowFocused
- ImGui.IsWindowAppearing
- ImGui.IsWindowCollapsed
- ImGui.GetItemRectMin
- ImGui.GetItemRectMax
- ImGui.GetItemRectSize
- ImGui.GetContentRegionAvail
- ImGui.GetCursorScreenPos
- ImGui.GetMousePos
- ImGui.GetTextLineHeight
- ImGui.GetTextLineHeightWithSpacing
- ImGui.GetFrameHeight
- ImGui.GetFrameHeightWithSpacing
- ImGui.CalcItemWidth
- ImGui.GetCursorPosX
- ImGui.GetCursorPosY
- ImGui.GetScrollX
- ImGui.GetScrollY
- ImGui.GetScrollMaxX
- ImGui.GetScrollMaxY
- ImGui.GetTime
- ImGui.GetDeltaTime
- ImGui.GetFrameCount
- ImGui.GetColumnIndex
- ImGui.GetColumnsCount
- ImGui.Spacing
- ImGui.NewLine
- ImGui.Bullet
- ImGui.BeginGroup
- ImGui.EndGroup
- ImGui.AlignTextToFramePadding
- ImGui.Dummy
- ImGui.SetCursorPosX
- ImGui.SetCursorPosY
- ImGui.SetCursorScreenPos
- ImGui.BulletText
- ImGui.LabelText
- ImGui.InputInt
- ImGui.InputFloat
- ImGui.DragFloat
- ImGui.DragInt
- ImGui.ColorEdit3
- ImGui.ColorEdit4
- ImGui.ProgressBar
- ImGui.ListBox
- ImGui.SetNextItemOpen
- ImGui.BeginTabBar
- ImGui.EndTabBar
- ImGui.BeginTabItem
- ImGui.EndTabItem
- ImGui.SetTabItemClosed
- ImGui.BeginTable
- ImGui.EndTable
- ImGui.TableNextRow
- ImGui.TableNextColumn
- ImGui.TableSetColumnIndex
- ImGui.TableSetupColumn
- ImGui.TableSetupScrollFreeze
- ImGui.TableHeadersRow
- ImGui.OpenPopup
- ImGui.CloseCurrentPopup
- ImGui.BeginPopupModal
- ImGui.BeginPopupContextItem
- ImGui.BeginPopupContextWindow
- ImGui.BeginPopupContextVoid
- ImGui.IsPopupOpen
- ImGui.SetNextWindowCollapsed
- ImGui.SetNextWindowFocus
- ImGui.SetNextWindowBgAlpha
- ImGui.SetWindowFontScale
- ImGui.SetScrollX
- ImGui.SetScrollY
- ImGui.PushStyleVar
- ImGui.PopStyleVar
- ImGui.BeginDisabled
- ImGui.EndDisabled
- ImGui.IsMouseClicked
- ImGui.IsMouseDown
- ImGui.IsMouseReleased
- ImGui.IsMouseDoubleClicked
- ImGui.CalcTextSize
- ImGui.Columns
- ImGui.NextColumn
- ImGui.GetColumnWidth
- ImGui.SetColumnWidth
- ImGui.SetTooltip
- ImGui.SetItemTooltip
- Read-only enum tables
- ImGui.WindowFlags
- ImGui.Cond
- ImGui.Dir
- ImGui.MouseButton
- ImGui.Color
- ImGui.TreeNodeFlags
- ImGui.InputTextFlags
- ImGui.SliderFlags
- ImGui.ColorEditFlags
- ImGui.SelectableFlags
- ImGui.ComboFlags
- ImGui.ChildFlags
- ImGui.StyleVar
- ImGui.TabBarFlags
- ImGui.TabItemFlags
- ImGui.TableFlags
- ImGui.TableColumnFlags
- ImGui.TableRowFlags
- ImGui.PopupFlags
- ImGui.HoveredFlags
- ImGui.FocusedFlags
- ImGui.ButtonFlags
The ImGui table records native immediate-mode UI commands. Its calling conventions are the module bindings documented here, not an automatic binding of every upstream ImGui overload.
Frame callbacks and result timing
BlockInput / InputBlockingtrueBlur / EnableBlurfalseDockable / AllowDockingtrueDockToMain / DockToMainUItrueFunctions
ImGui.OnRender
ImGui.OnRender(callback: () -> ()): ()Registers a persistent, non-yielding frame callback. Runs once immediately to build commands, then rebuilds through the scheduler for rendering. Returns no connection. Registering another callback that creates a window with the same title retires the old callback; environment reset removes registrations.
ImGui.Begin
ImGui.Begin(title: string, open: boolean?, flags: number?, options: WindowOptions?): (boolean, boolean)Records a window. Returns previous visibility (native visibility and open state combined) and close interaction flag; first build falls back to the supplied open value. Defaults open=true, flags=0. Options may be argument 2 or 3. Always pair End, even if visibility is false; do not treat collapsed visibility as a closed window.
Returns
(boolean, boolean)Latest completed render result; see frame timing above.
ImGui.End
ImGui.End(): ()Ends the current window; pair with Begin.
ImGui.PushStyleColor
ImGui.PushStyleColor(index: number, color: Color3 | number): ()Pushes a style color. Index uses ImGui.Color; packed colors preserve alpha, Color3 supplies alpha=1.
ImGui.PopStyleColor
ImGui.PopStyleColor(count: number?): ()Pops count style colors; default 1.
ImGui.SameLine
ImGui.SameLine(position: number?, spacing: number?): ()Continues on the same line. Defaults position=0, spacing=-1 (theme spacing).
ImGui.PushID
ImGui.PushID(id: number): ()Pushes an integer ID into both the recorded and rendered ID stacks. Use stable IDs for repeated controls.
ImGui.PopID
ImGui.PopID(): ()Pops an ID pushed by PushID.
ImGui.SetNextWindowPos
ImGui.SetNextWindowPos(position: Vector2, condition: number?, pivot: Vector2?): ()Sets next window position; defaults condition=0 and pivot=(0,0). Use ImGui.Cond.
ImGui.SetNextWindowSize
ImGui.SetNextWindowSize(size: Vector2, condition: number?): ()Sets next window size; condition defaults to 0.
ImGui.GetWindowPos
ImGui.GetWindowPos(): Vector2Returns the matching recorded position, size, available content area or pointer coordinate. First build returns (0,0); rendering uses logical DPI-adjusted coordinates.
Returns
Vector2Latest completed render result; see frame timing above.
ImGui.GetWindowSize
ImGui.GetWindowSize(): Vector2Returns the matching recorded position, size, available content area or pointer coordinate. First build returns (0,0); rendering uses logical DPI-adjusted coordinates.
Returns
Vector2Latest completed render result; see frame timing above.
ImGui.Text
ImGui.Text(text: string): ()Records literal text (not a printf format string); the function name selects normal, disabled, wrapped or bullet presentation.
ImGui.TextColored
ImGui.TextColored(color: Color3 | number, text: string): ()Records literal colored text; packed color numbers include alpha.
ImGui.TextDisabled
ImGui.TextDisabled(text: string): ()Records literal text (not a printf format string); the function name selects normal, disabled, wrapped or bullet presentation.
ImGui.TextEx
ImGui.TextEx(text: string, flags: number?): ()Records literal text with internal text flags; flags defaults to 0.
ImGui.TextWrapped
ImGui.TextWrapped(text: string): ()Records literal text (not a printf format string); the function name selects normal, disabled, wrapped or bullet presentation.
ImGui.ArrowButton
ImGui.ArrowButton(label: string, direction: number, size: Vector2?): booleanArrow button using ImGui.Dir. Size defaults to (0,0); normal ArrowButton uses native sizing. Returns a press interaction.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.ArrowButtonEx
ImGui.ArrowButtonEx(label: string, direction: number, size: Vector2?, flags: number?): booleanSized arrow button; defaults size=(0,0), flags=0. Returns a press interaction.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.Button
ImGui.Button(label: string, size: Vector2?): booleanReturns a press interaction from the last completed render. Size defaults to (0,0); SmallButton records this argument but uses native small-button sizing.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.ButtonEx
ImGui.ButtonEx(label: string, size: Vector2?, flags: number?): booleanExtended button; defaults size=(0,0), flags=0 (ImGui.ButtonFlags). Returns a press interaction.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.ColorButton
ImGui.ColorButton(label: string, color: Color3 | number, flags: number?, size: Vector2?): booleanColor button using ImGui.ColorEditFlags. Defaults flags=0, size=(0,0). Returns a press interaction.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.ImageButton
ImGui.ImageButton(texture: number | lightuserdata, size: Vector2, uv0: Vector2?, uv1: Vector2?, background: Color3 | number?, tint: Color3 | number?): booleanImage button; texture is a native texture identifier, not an encoded image string or Drawing resource. Defaults uv0=(0,0), uv1=(1,1), transparent background and white tint. Use PushID around multiple image buttons.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.InvisibleButton
ImGui.InvisibleButton(size: Vector2, flags: number?): booleanInvisible interaction region with a generated ID. Defaults flags=0; use PushID for multiple regions.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.RadioButton
ImGui.RadioButton(label: string, active: boolean): booleanRecords the supplied selection state and returns a press interaction; assign your selection in response.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.SmallButton
ImGui.SmallButton(label: string, size: Vector2?): booleanReturns a press interaction from the last completed render. Size defaults to (0,0); SmallButton records this argument but uses native small-button sizing.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.TabItemButton
ImGui.TabItemButton(label: string, flags: number?): booleanButton on a tab bar; flags defaults to 0 (ImGui.TabItemFlags).
Returns
booleanLatest completed render result; see frame timing above.
ImGui.Checkbox
ImGui.Checkbox(label: string, value: boolean?): (boolean, boolean)Returns value and changed flag; default value=false. Store the returned value for the next build.
Returns
(boolean, boolean)Latest completed render result; see frame timing above.
ImGui.SliderAngle
ImGui.SliderAngle(label: string, radians: number?, minimumDegrees: number?, maximumDegrees: number?, format: string?, flags: number?): (number, boolean)Returns radians and changed flag. Defaults radians=0, minimumDegrees=-360, maximumDegrees=360, format=%.0f deg, flags=0.
Returns
(number, boolean)Latest completed render result; see frame timing above.
ImGui.SliderFloat
ImGui.SliderFloat(label: string, value: number?, minimum: number, maximum: number, format: string?, flags: number?): (number, boolean)Returns value and changed flag. Initial value defaults to 0; format defaults to %.3f for SliderFloat and %d for SliderInt; flags=0 (ImGui.SliderFlags). Bounds are required, even when value is nil.
Returns
(number, boolean)Latest completed render result; see frame timing above.
ImGui.SliderInt
ImGui.SliderInt(label: string, value: number?, minimum: number, maximum: number, format: string?, flags: number?): (number, boolean)Returns value and changed flag. Initial value defaults to 0; format defaults to %.3f for SliderFloat and %d for SliderInt; flags=0 (ImGui.SliderFlags). Bounds are required, even when value is nil.
Returns
(number, boolean)Latest completed render result; see frame timing above.
ImGui.Combo
ImGui.Combo(label: string, selected: number, items: {string}): (number, boolean)Returns the zero-based selected index and changed flag. The items table is a normal 1-based Lua array, but selection is native ImGui zero-based; empty items produce -1. Values are clamped to the valid item range on render.
Returns
(number, boolean)Latest completed render result; see frame timing above.
ImGui.ColorPicker3
ImGui.ColorPicker3(label: string, color: Color3 | number, flags: number?): (Color3, boolean)Returns RGB Color3 and changed flag; flags defaults to 0. The 4-component variants accept alpha through a packed color number, but the returned Color3 has no alpha channel.
Returns
(Color3, boolean)Latest completed render result; see frame timing above.
ImGui.ColorPicker4
ImGui.ColorPicker4(label: string, color: Color3 | number, flags: number?): (Color3, boolean)Returns RGB Color3 and changed flag; flags defaults to 0. The 4-component variants accept alpha through a packed color number, but the returned Color3 has no alpha channel.
Returns
(Color3, boolean)Latest completed render result; see frame timing above.
ImGui.Selectable
ImGui.Selectable(label: string, selected: boolean?, flags: number?, size: Vector2?): (boolean, boolean)Returns selected state and interaction flag. Defaults selected=false, flags=0 (ImGui.SelectableFlags), size=(0,0).
Returns
(boolean, boolean)Latest completed render result; see frame timing above.
ImGui.StringBuffer
ImGui.StringBuffer(initial: string?, capacity: number?): ImGuiStringBufferCreates persistent text storage. Defaults initial="", capacity=256 bytes; capacity must be 2..1048576 and includes the terminator. Initial text is truncated to capacity-1 and uses C-string semantics. tostring(buffer) reads its current text. No other methods or writable fields are exposed.
Returns
ImGuiStringBufferThe result described above.
ImGui.InputText
ImGui.InputText(label: string, buffer: ImGuiStringBuffer, flags: number?): (string, boolean)Records an editable buffer and returns text and interaction flag. Flags defaults to 0 (ImGui.InputTextFlags). Keep the same buffer across builds; render updates its contents.
Returns
(string, boolean)Latest completed render result; see frame timing above.
ImGui.InputTextWithHint
ImGui.InputTextWithHint(label: string, hint: string, buffer: ImGuiStringBuffer, flags: number?): (string, boolean)Like InputText, with placeholder text; flags defaults to 0.
Returns
(string, boolean)Latest completed render result; see frame timing above.
ImGui.CollapsingHeader
ImGui.CollapsingHeader(label: string, flags: number?): booleanReturns the previous expanded state; first build=false. Flags defaults to 0 (ImGui.TreeNodeFlags). A header does not need TreePop.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.SetItemAllowOverlap
ImGui.SetItemAllowOverlap(): ()Allows the last recorded item to overlap another interaction region.
ImGui.GetColorU32
ImGui.GetColorU32(red: number?, green: number?, blue: number?, alpha: number?): numberImmediately converts RGBA floats to a packed color number; each component defaults to 1. Callable outside OnRender.
Returns
numberThe result described above.
ImGui.BeginMenuBar
ImGui.BeginMenuBar(): booleanBegins a window menu bar; first build=true. EndMenuBar is paired when the returned state is true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.EndMenuBar
ImGui.EndMenuBar(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.BeginMenu
ImGui.BeginMenu(label: string, enabled: boolean?): booleanBegins a menu; enabled defaults to true. Pair EndMenu only when true; first build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.EndMenu
ImGui.EndMenu(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.MenuItem
ImGui.MenuItem(label: string, shortcut: string?, selected: boolean?, enabled: boolean?): (boolean, boolean)Returns selected state and interaction flag. Defaults shortcut="", selected=false, enabled=true.
Returns
(boolean, boolean)Latest completed render result; see frame timing above.
ImGui.Separator
ImGui.Separator(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.IsItemClicked
ImGui.IsItemClicked(button: number?): booleanQueries the last item click or named mouse-button state from the completed render. Button defaults to 0 (left); use ImGui.MouseButton.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.TreeNode
ImGui.TreeNode(label: string, id: number?): booleanRecords a tree node, optionally with an explicit integer ID; first build=false. Pair TreePop only for an open node.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.TreeNodeEx
ImGui.TreeNodeEx(label: string, flags: number?, id: number?): booleanTree node with ImGui.TreeNodeFlags (default 0) and optional integer ID. Pair TreePop for an open node unless flags disable the push.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.TreePop
ImGui.TreePop(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.Image
ImGui.Image(texture: number | lightuserdata, size: Vector2, uv0: Vector2?, uv1: Vector2?, tint: Color3 | number?, border: Color3 | number?): ()Records a native texture identifier. Defaults uv0=(0,0), uv1=(1,1), white tint, transparent border. It does not decode image files or accept Drawing resource userdata.
ImGui.PushItemWidth
ImGui.PushItemWidth(width: number): ()Pushes the width used by subsequent input controls; pair with PopItemWidth.
ImGui.PopItemWidth
ImGui.PopItemWidth(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.SetNextWindowSizeConstraints
ImGui.SetNextWindowSizeConstraints(minimum: Vector2, maximum: Vector2): ()Constrains the next window size.
ImGui.SetScrollHereX
ImGui.SetScrollHereX(centerRatio: number?): ()Scrolls the current region toward the last item; centerRatio defaults to 0.5.
ImGui.SetScrollHereY
ImGui.SetScrollHereY(centerRatio: number?): ()Scrolls the current region toward the last item; centerRatio defaults to 0.5.
ImGui.BeginChild
ImGui.BeginChild(id: string, size: Vector2?, childFlags: number?, windowFlags: number?): ()Records a child window and returns no value in this binding. Defaults size=(0,0), childFlags=0, windowFlags=0. Always pair EndChild; use ImGui.ChildFlags and ImGui.WindowFlags.
ImGui.EndChild
ImGui.EndChild(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.SetItemDefaultFocus
ImGui.SetItemDefaultFocus(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.SetKeyboardFocusHere
ImGui.SetKeyboardFocusHere(relativeIndex: number?): ()Requests keyboard focus; relativeIndex defaults to 0.
ImGui.BeginTooltip
ImGui.BeginTooltip(): booleanBegins a tooltip and returns its prior visibility (first build=true); pair EndTooltip when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.BeginTooltipEx
ImGui.BeginTooltipEx(tooltipFlags: number, windowFlags: number): booleanExtended tooltip with required integer flag arguments; first build=true. Pair EndTooltip when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.BeginItemTooltip
ImGui.BeginItemTooltip(): booleanBegins a tooltip for the last item; first build=false. Pair EndTooltip when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.BeginTooltipHidden
ImGui.BeginTooltipHidden(): booleanBegins a tooltip and returns its prior visibility (first build=true); pair EndTooltip when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.EndTooltip
ImGui.EndTooltip(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.BeginPopup
ImGui.BeginPopup(id: string, flags: number?): booleanBegins a previously opened popup. Flags defaults to 0; first build=false. Pair EndPopup only when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.EndPopup
ImGui.EndPopup(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.BeginCombo
ImGui.BeginCombo(label: string, preview: string, flags: number?): booleanBegins a custom combo body; flags=0 (ImGui.ComboFlags). First build=false; pair EndCombo when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.EndCombo
ImGui.EndCombo(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.BeginListBox
ImGui.BeginListBox(label: string, size: Vector2?): booleanBegins a custom list body; size=(0,0). First build=true; pair EndListBox when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.EndListBox
ImGui.EndListBox(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.Indent
ImGui.Indent(width: number?): ()Adds or removes indentation; width defaults to 0 (theme indentation).
ImGui.Unindent
ImGui.Unindent(width: number?): ()Adds or removes indentation; width defaults to 0 (theme indentation).
ImGui.GetCursorPos
ImGui.GetCursorPos(): Vector2Returns the matching recorded position, size, available content area or pointer coordinate. First build returns (0,0); rendering uses logical DPI-adjusted coordinates.
Returns
Vector2Latest completed render result; see frame timing above.
ImGui.SetCursorPos
ImGui.SetCursorPos(position: Vector2): ()Sets cursor coordinates relative to the window or screen, respectively; logical DPI-adjusted units.
ImGui.SetVSync
ImGui.SetVSync(enabled: boolean): ()Sets module VSync immediately; callable outside OnRender.
ImGui.IsItemHovered
ImGui.IsItemHovered(flags: number?): booleanReturns the named hover/focus state, with flags defaulting to 0; use ImGui.HoveredFlags or ImGui.FocusedFlags. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsItemActive
ImGui.IsItemActive(): booleanReturns whether the last item is being activated. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsItemFocused
ImGui.IsItemFocused(): booleanReturns whether the last item has keyboard focus. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsItemVisible
ImGui.IsItemVisible(): booleanReturns whether the last item is inside its clipping rectangle. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsItemEdited
ImGui.IsItemEdited(): booleanReturns whether the last item was edited. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsItemActivated
ImGui.IsItemActivated(): booleanReturns whether the last item became active. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsItemDeactivated
ImGui.IsItemDeactivated(): booleanReturns whether the last item stopped being active. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsItemDeactivatedAfterEdit
ImGui.IsItemDeactivatedAfterEdit(): booleanReturns whether the last item stopped being active after editing. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsAnyItemHovered
ImGui.IsAnyItemHovered(): booleanReturns whether the any item is hovered. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsAnyItemActive
ImGui.IsAnyItemActive(): booleanReturns whether the any item is active. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsWindowHovered
ImGui.IsWindowHovered(flags: number?): booleanReturns the named hover/focus state, with flags defaulting to 0; use ImGui.HoveredFlags or ImGui.FocusedFlags. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsWindowFocused
ImGui.IsWindowFocused(flags: number?): booleanReturns the named hover/focus state, with flags defaulting to 0; use ImGui.HoveredFlags or ImGui.FocusedFlags. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsWindowAppearing
ImGui.IsWindowAppearing(): booleanReturns whether the window appeared this frame. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsWindowCollapsed
ImGui.IsWindowCollapsed(): booleanReturns whether the window is collapsed. First build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.GetItemRectMin
ImGui.GetItemRectMin(): Vector2Returns the matching recorded position, size, available content area or pointer coordinate. First build returns (0,0); rendering uses logical DPI-adjusted coordinates.
Returns
Vector2Latest completed render result; see frame timing above.
ImGui.GetItemRectMax
ImGui.GetItemRectMax(): Vector2Returns the matching recorded position, size, available content area or pointer coordinate. First build returns (0,0); rendering uses logical DPI-adjusted coordinates.
Returns
Vector2Latest completed render result; see frame timing above.
ImGui.GetItemRectSize
ImGui.GetItemRectSize(): Vector2Returns the matching recorded position, size, available content area or pointer coordinate. First build returns (0,0); rendering uses logical DPI-adjusted coordinates.
Returns
Vector2Latest completed render result; see frame timing above.
ImGui.GetContentRegionAvail
ImGui.GetContentRegionAvail(): Vector2Returns the matching recorded position, size, available content area or pointer coordinate. First build returns (0,0); rendering uses logical DPI-adjusted coordinates.
Returns
Vector2Latest completed render result; see frame timing above.
ImGui.GetCursorScreenPos
ImGui.GetCursorScreenPos(): Vector2Returns the matching recorded position, size, available content area or pointer coordinate. First build returns (0,0); rendering uses logical DPI-adjusted coordinates.
Returns
Vector2Latest completed render result; see frame timing above.
ImGui.GetMousePos
ImGui.GetMousePos(): Vector2Returns the matching recorded position, size, available content area or pointer coordinate. First build returns (0,0); rendering uses logical DPI-adjusted coordinates.
Returns
Vector2Latest completed render result; see frame timing above.
ImGui.GetTextLineHeight
ImGui.GetTextLineHeight(): numberReturns the text-line height; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetTextLineHeightWithSpacing
ImGui.GetTextLineHeightWithSpacing(): numberReturns the text-line height including spacing; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetFrameHeight
ImGui.GetFrameHeight(): numberReturns the control frame height; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetFrameHeightWithSpacing
ImGui.GetFrameHeightWithSpacing(): numberReturns the control frame height including spacing; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.CalcItemWidth
ImGui.CalcItemWidth(): numberReturns the current item width; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetCursorPosX
ImGui.GetCursorPosX(): numberReturns the local cursor X; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetCursorPosY
ImGui.GetCursorPosY(): numberReturns the local cursor Y; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetScrollX
ImGui.GetScrollX(): numberReturns the horizontal scroll; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetScrollY
ImGui.GetScrollY(): numberReturns the vertical scroll; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetScrollMaxX
ImGui.GetScrollMaxX(): numberReturns the maximum horizontal scroll; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetScrollMaxY
ImGui.GetScrollMaxY(): numberReturns the maximum vertical scroll; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetTime
ImGui.GetTime(): numberReturns the ImGui elapsed seconds; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetDeltaTime
ImGui.GetDeltaTime(): numberReturns the render delta seconds; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetFrameCount
ImGui.GetFrameCount(): numberReturns the render frame count; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetColumnIndex
ImGui.GetColumnIndex(): numberReturns the zero-based current legacy column; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.GetColumnsCount
ImGui.GetColumnsCount(): numberReturns the legacy column count; first build=0. Layout measurements use logical DPI-adjusted units.
Returns
numberLatest completed render result; see frame timing above.
ImGui.Spacing
ImGui.Spacing(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.NewLine
ImGui.NewLine(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.Bullet
ImGui.Bullet(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.BeginGroup
ImGui.BeginGroup(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.EndGroup
ImGui.EndGroup(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.AlignTextToFramePadding
ImGui.AlignTextToFramePadding(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.Dummy
ImGui.Dummy(size: Vector2): ()Reserves a non-interactive layout region.
ImGui.SetCursorPosX
ImGui.SetCursorPosX(position: number): ()Sets a local cursor component in logical DPI-adjusted units.
ImGui.SetCursorPosY
ImGui.SetCursorPosY(position: number): ()Sets a local cursor component in logical DPI-adjusted units.
ImGui.SetCursorScreenPos
ImGui.SetCursorScreenPos(position: Vector2): ()Sets cursor coordinates relative to the window or screen, respectively; logical DPI-adjusted units.
ImGui.BulletText
ImGui.BulletText(text: string): ()Records literal text (not a printf format string); the function name selects normal, disabled, wrapped or bullet presentation.
ImGui.LabelText
ImGui.LabelText(label: string, text: string): ()Records a value with a separate label; both strings are literal, not format strings.
ImGui.InputInt
ImGui.InputInt(label: string, value: number?, step: number?, fastStep: number?, flags: number?): (number, boolean)Integer input returning value and changed flag. Defaults value=0, step=1, fastStep=100, flags=0 (ImGui.InputTextFlags).
Returns
(number, boolean)Latest completed render result; see frame timing above.
ImGui.InputFloat
ImGui.InputFloat(label: string, value: number?, step: number?, fastStep: number?, format: string?, flags: number?): (number, boolean)Float input returning value and changed flag. Defaults value=0, step=0, fastStep=0, format=%.3f, flags=0 (ImGui.InputTextFlags).
Returns
(number, boolean)Latest completed render result; see frame timing above.
ImGui.DragFloat
ImGui.DragFloat(label: string, value: number?, speed: number?, minimum: number?, maximum: number?, format: string?, flags: number?): (number, boolean)Drag input returning value and changed flag. Defaults value=0, speed=1, minimum=0, maximum=0 (unbounded), format=%.3f for DragFloat / %d for DragInt, flags=0 (ImGui.SliderFlags).
Returns
(number, boolean)Latest completed render result; see frame timing above.
ImGui.DragInt
ImGui.DragInt(label: string, value: number?, speed: number?, minimum: number?, maximum: number?, format: string?, flags: number?): (number, boolean)Drag input returning value and changed flag. Defaults value=0, speed=1, minimum=0, maximum=0 (unbounded), format=%.3f for DragFloat / %d for DragInt, flags=0 (ImGui.SliderFlags).
Returns
(number, boolean)Latest completed render result; see frame timing above.
ImGui.ColorEdit3
ImGui.ColorEdit3(label: string, color: Color3 | number, flags: number?): (Color3, boolean)Returns RGB Color3 and changed flag; flags defaults to 0. The 4-component variants accept alpha through a packed color number, but the returned Color3 has no alpha channel.
Returns
(Color3, boolean)Latest completed render result; see frame timing above.
ImGui.ColorEdit4
ImGui.ColorEdit4(label: string, color: Color3 | number, flags: number?): (Color3, boolean)Returns RGB Color3 and changed flag; flags defaults to 0. The 4-component variants accept alpha through a packed color number, but the returned Color3 has no alpha channel.
Returns
(Color3, boolean)Latest completed render result; see frame timing above.
ImGui.ProgressBar
ImGui.ProgressBar(fraction: number, size: Vector2?, overlay: string?): ()Progress bar; defaults size=(-1,0), overlay="". Fraction is supplied directly to ImGui.
ImGui.ListBox
ImGui.ListBox(label: string, selected: number, items: {string}, heightInItems: number?): (number, boolean)Returns a zero-based selected index and changed flag. Items use a 1-based Lua array; empty items produce -1. Height defaults to -1.
Returns
(number, boolean)Latest completed render result; see frame timing above.
ImGui.SetNextItemOpen
ImGui.SetNextItemOpen(open: boolean, condition: number?): ()Sets next tree item expansion; condition defaults to 0 (ImGui.Cond).
ImGui.BeginTabBar
ImGui.BeginTabBar(id: string, flags: number?): booleanBegins a tab bar; flags=0 (ImGui.TabBarFlags), first build=true. Pair EndTabBar when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.EndTabBar
ImGui.EndTabBar(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.BeginTabItem
ImGui.BeginTabItem(label: string, open: boolean?, flags: number?): (boolean, boolean)Returns previous tab visibility and previous open state (both true on first build). Omit open to hide its close button; flags=0. Pair EndTabItem only for a visible tab.
Returns
(boolean, boolean)Latest completed render result; see frame timing above.
ImGui.EndTabItem
ImGui.EndTabItem(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.SetTabItemClosed
ImGui.SetTabItemClosed(label: string): ()Notifies the tab bar that a tab was closed.
ImGui.BeginTable
ImGui.BeginTable(id: string, columns: number, flags: number?, outerSize: Vector2?, innerWidth: number?): booleanBegins a table; defaults flags=0 (ImGui.TableFlags), outerSize=(0,0), innerWidth=0. First build=true. Pair EndTable when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.EndTable
ImGui.EndTable(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.TableNextRow
ImGui.TableNextRow(flags: number?, minimumHeight: number?): ()Begins the next table row; defaults flags=0 (ImGui.TableRowFlags), minimumHeight=0.
ImGui.TableNextColumn
ImGui.TableNextColumn(): booleanAdvances a table column and returns its previous visibility; first build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.TableSetColumnIndex
ImGui.TableSetColumnIndex(column: number): booleanSelects a zero-based table column and returns its previous visibility; first build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.TableSetupColumn
ImGui.TableSetupColumn(label: string, flags: number?, initialWidthOrWeight: number?): ()Configures a table column; defaults flags=0 (ImGui.TableColumnFlags), initialWidthOrWeight=0. This binding has no user-ID argument.
ImGui.TableSetupScrollFreeze
ImGui.TableSetupScrollFreeze(columns: number, rows: number): ()Freezes the first columns and rows while scrolling.
ImGui.TableHeadersRow
ImGui.TableHeadersRow(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.OpenPopup
ImGui.OpenPopup(id: string, flags: number?): ()Opens a popup; flags defaults to 0 (ImGui.PopupFlags).
ImGui.CloseCurrentPopup
ImGui.CloseCurrentPopup(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.BeginPopupModal
ImGui.BeginPopupModal(name: string, open: boolean?, flags: number?): (boolean, boolean)Returns previous visibility (first=false) and open state (first=true). Omit open to hide the close button; flags=0. Pair EndPopup when visible.
Returns
(boolean, boolean)Latest completed render result; see frame timing above.
ImGui.BeginPopupContextItem
ImGui.BeginPopupContextItem(id: string?, flags: number?): booleanBegins a contextual popup. Defaults id="", flags=1 (right mouse button); first build=false. Pair EndPopup when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.BeginPopupContextWindow
ImGui.BeginPopupContextWindow(id: string?, flags: number?): booleanBegins a contextual popup. Defaults id="", flags=1 (right mouse button); first build=false. Pair EndPopup when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.BeginPopupContextVoid
ImGui.BeginPopupContextVoid(id: string?, flags: number?): booleanBegins a contextual popup. Defaults id="", flags=1 (right mouse button); first build=false. Pair EndPopup when true.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsPopupOpen
ImGui.IsPopupOpen(id: string, flags: number?): booleanQueries popup state with flags defaulting to 0; first build=false.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.SetNextWindowCollapsed
ImGui.SetNextWindowCollapsed(collapsed: boolean, condition: number?): ()Sets next window collapsed state; condition defaults to 0 (ImGui.Cond).
ImGui.SetNextWindowFocus
ImGui.SetNextWindowFocus(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.SetNextWindowBgAlpha
ImGui.SetNextWindowBgAlpha(alpha: number): ()Sets next window background alpha.
ImGui.SetWindowFontScale
ImGui.SetWindowFontScale(scale: number): ()Sets current window font scale.
ImGui.SetScrollX
ImGui.SetScrollX(scroll: number): ()Sets the named scroll component.
ImGui.SetScrollY
ImGui.SetScrollY(scroll: number): ()Sets the named scroll component.
ImGui.PushStyleVar
ImGui.PushStyleVar(index: number, value: number | Vector2): ()Pushes a numeric or Vector2 style variable; index uses ImGui.StyleVar and value must match its native type. Pair PopStyleVar.
ImGui.PopStyleVar
ImGui.PopStyleVar(count: number?): ()Pops style variables; count defaults to 1.
ImGui.BeginDisabled
ImGui.BeginDisabled(disabled: boolean?): ()Begins a disabled-control region; disabled defaults to true. Pair EndDisabled.
ImGui.EndDisabled
ImGui.EndDisabled(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.IsMouseClicked
ImGui.IsMouseClicked(button: number?): booleanQueries the last item click or named mouse-button state from the completed render. Button defaults to 0 (left); use ImGui.MouseButton.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsMouseDown
ImGui.IsMouseDown(button: number?): booleanQueries the last item click or named mouse-button state from the completed render. Button defaults to 0 (left); use ImGui.MouseButton.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsMouseReleased
ImGui.IsMouseReleased(button: number?): booleanQueries the last item click or named mouse-button state from the completed render. Button defaults to 0 (left); use ImGui.MouseButton.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.IsMouseDoubleClicked
ImGui.IsMouseDoubleClicked(button: number?): booleanQueries the last item click or named mouse-button state from the completed render. Button defaults to 0 (left); use ImGui.MouseButton.
Returns
booleanLatest completed render result; see frame timing above.
ImGui.CalcTextSize
ImGui.CalcTextSize(text: string, wrapWidth: number?): Vector2Returns prior text measurement; wrapWidth defaults to -1 (no wrapping). First build=(0,0).
Returns
Vector2Latest completed render result; see frame timing above.
ImGui.Columns
ImGui.Columns(count: number?, id: string?, borders: boolean?): ()Configures legacy columns; defaults count=1, id="", borders=true. Column indices are zero-based.
ImGui.NextColumn
ImGui.NextColumn(): ()Records the named layout, scope, focus or popup command. End/Pop commands close their matching Begin/Push scope; TableHeadersRow uses columns configured by TableSetupColumn.
ImGui.GetColumnWidth
ImGui.GetColumnWidth(column: number?): numberReturns prior legacy-column width; column defaults to -1 (current); first build=0.
Returns
numberLatest completed render result; see frame timing above.
ImGui.SetColumnWidth
ImGui.SetColumnWidth(column: number, width: number): ()Sets zero-based legacy-column width.
ImGui.SetTooltip
ImGui.SetTooltip(text: string): ()Records literal tooltip text; SetItemTooltip targets the last item.
ImGui.SetItemTooltip
ImGui.SetItemTooltip(text: string): ()Records literal tooltip text; SetItemTooltip targets the last item.
Read-only enum tables
Only the entries listed here are exported. Combine compatible flag entries with bit32.bor. The table and its nested enum tables are read-only; values are taken from the bundled ImGui build.
ImGui.WindowFlags
ImGui.Cond
ImGui.Dir
ImGui.MouseButton
ImGui.Color
ImGui.TreeNodeFlags
ImGui.InputTextFlags
ImGui.SliderFlags
ImGui.ColorEditFlags
ImGui.SelectableFlags
ImGui.ComboFlags
ImGui.ChildFlags
ImGui.StyleVar
ImGui.TabBarFlags
ImGui.TabItemFlags
ImGui.TableFlags
ImGui.TableColumnFlags
ImGui.TableRowFlags
ImGui.PopupFlags
ImGui.HoveredFlags
ImGui.FocusedFlags
ImGui.ButtonFlags
Written for Lynx 0.0.0
Something unclear? Tell us on Discord