Drawing Functions

  • SetAutoFrame: Enable or disable auto-frame mode for the current coroutine.
  • WithFrame: Execute a callback between BeginFrame and SubmitFrame automatically.
  • PushClipRect: Push a clipping rectangle onto the draw clip stack.
  • PopClipRect: Pop the last clipping rectangle from the draw clip stack.
  • WithClipRect: Execute a callback with a temporary clipping rectangle.
  • DrawTextCentered: Draw text horizontally centered at a given X position.
  • DrawTextOutlined: Draw text with a 1px outline for readability on any background.
  • DrawRoundedRect: Draw a rounded rectangle outline with rounding as a required parameter.
  • DrawRoundedRectFilled: Draw a filled rounded rectangle with rounding as a required parameter.
  • DrawShadowRect: Draw a filled rectangle with an automatic drop shadow.
  • DrawBorderRect: Draw a filled rectangle with a colored border in a single call.
  • DrawBlurRect: Draw a rectangular blur (frosted-glass) region with an optional tint.
  • BeginFrame: Start a new Lua render frame. Clears the build buffer for this tick.
  • SubmitFrame: Publish the current build buffer as the active frame to render on the Overlay.
  • ResetFrame: Clear all queued and displayed draw commands for the current Lua coroutine. Empties both build and render buffers and cancels any pending swap.
  • ResetAllFrames: Clear every coroutine’s build and render buffers. Removes all layers.
  • DrawLine: Enqueue a line in the current build buffer.
  • DrawRect: Draw a rectangle outline with optional rounding.
  • DrawRectFilled: Draw a filled rectangle with optional rounding.
  • DrawRectGradient: Enqueue a filled rectangle with gradient in the current build buffer.
  • DrawCircle: Enqueue a circle (filled or outline) in the current build buffer.
  • DrawText: Draw text at a given position with optional font.
  • GetTextWidth: Measure the pixel width of a text string at a given font size.
  • WorldToScreen: Project a 3D world position to 2D screen space.
  • LoadFont: Load a TTF/OTF font into ImGui and return its handle.
  • LoadFontFromBuffer: Load a TTF/OTF font into ImGui and return its handle.
  • PushFont: Make a previously loaded font the current font for this coroutine.
  • PopFont: Restore the previous font for this coroutine.
  • LoadTexture: Load an image file into a DX11 texture.
  • LoadTextureFromBuffer: Load a texture from raw image bytes.
  • ReleaseTexture: Free a previously loaded texture.
  • DrawImage: Draw a texture on screen with optional tint, rounding, and UVs.