API reference
Preparing search index…

ImGui.Begin

  • Begin or append to a window.

    Parameters

    name
    string | Uint8Array

    Window name used as its persistent ID and displayed title; ### can separate the title from the ID.

    p_open
    null | Uint8Array = null

    Optional open state in Uint8Array[0]. Write only 0 (closed) or 1 (open); the close button writes 0. Null omits the close button. The native call accesses this writable backing memory directly.

    flags
    number = 0

    ImGuiWindowFlags options controlling this operation; combine compatible flag bits with |.

    Returns

    boolean

    True when window contents should be submitted; false when collapsed or fully clipped. Call End() even when false.

    • Begin() pushes the window onto the stack and starts appending content. Call End() for every Begin(), even when it returns false.

    • A false return means the window is collapsed or fully clipped; skip its contents, but still call End(). Unlike most BeginXXX()/EndXXX() pairs, both Begin() and BeginChild() always require their matching end call.

    • Pass a Uint8Array as p_open to show a close button. Its first element holds the open state; clicking the close button writes 0 to p_open[0]. Pass null to omit the close button. The application decides whether to call Begin() again based on that state.

    • Multiple Begin()/End() pairs may append to the same window in one frame. Only the first Begin() considers flags and p_open.

    • The bottom of the window stack always contains the window named "Debug".

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0