API reference
Preparing search index…

ImGui.BeginDisabled

  • Begin a scope that can disable user interaction.

    Parameters

    disabled
    boolean = true

    True disables interaction and dims following items until EndDisabled(); nested disabled scopes remain disabled.

    Returns

    void
    • Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)

    • Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled)

    • Tooltips windows by exception are opted out of disabling.

    • BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls)

    Source & inheritance

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