API reference
Preparing search index…

ImGui.InputText

  • Edit a single line of text.

    Parameters

    label
    string | Uint8Array

    Widget label; interactive widgets also use it for ID generation. A ## suffix can distinguish IDs without displaying the suffix.

    buf
    Uint8Array

    Writable NUL-terminated UTF-8 Uint8Array; edits update its bytes in place.

    buf_size
    number

    Writable capacity in bytes including the final NUL; must not exceed buf.byteLength.

    flags
    number = 0

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

    Returns

    boolean

    Normally true when text changes; with ImGuiInputTextFlags.EnterReturnsTrue, true reports Enter validation instead. Inspect the buffer for the edited bytes.

    Most ImGuiInputTextFlags options apply to text fields, not numeric inputs such as InputFloat, InputInt, or InputDouble.

    The helper omits the callback and user data (callback = null, user_data = null). Use InputTextEx() for a JavaScript callback. The upstream C++ adapter for dynamic strings is documented in misc/cpp/imgui_stdlib.h and imgui_demo.cpp; it is not a JavaScript string-buffer interface.

    Source & inheritance

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