Skip to content

Feature request: PushBehaviour to change widget return and buffer write out behaviour #2060

Description

@LAK132

Version/Branch of Dear ImGui:
1.64


As per the later discussion in #2006, would it be possible to change the return behaviour of some widgets with something like PushStyleVar?
Say if you did ImGui::PushBehaviour(ReturnBehaviourFlags_ReturnTrueOnChange) it made widgets return true every change, but ImGui::PushBehaviour(ReturnBehaviourFlags_ReturnTrueOnComplete) made them only return true when the user is finished modifying the value. This method could reduce the number of flags needed for each widget type and possibly remove the need for IsItemDeactivatedAfterEdit().
It might also be interesting to use this to change how and when values are written out from their buffers, potentially reducing the number of resize() calls in the std::string version of ImGui::InputText

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions