1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-29 03:00:05 +00:00

TestEngine: log calls don't need testing hook active.

Docs: tweak comments on BeginDisabled(false)/EndDisabled() pairs.
This commit is contained in:
ocornut 2024-09-24 20:22:16 +02:00
parent bc77041b57
commit 44a73be6ea
3 changed files with 4 additions and 5 deletions

View file

@ -7735,9 +7735,8 @@ void ImGui::PopItemFlag()
// - 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)
// - Visually this is currently altering alpha, but it is expected that in a future styling system this would work differently.
// - Feedback welcome at https://github.com/ocornut/imgui/issues/211
// - BeginDisabled(false) essentially does nothing useful but is provided to facilitate use of boolean expressions.
// (as a micro-optimisation if you can avoid calling BeginDisabled(false)/EndDisabled() tens of thousands of times by doing a local check, it won't hurt)
// - Optimized shortcuts instead of PushStyleVar() + PushItemFlag()
// - 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)
// - Note: mixing up BeginDisabled() and PushItemFlag(ImGuiItemFlags_Disabled) is currently NOT SUPPORTED.
void ImGui::BeginDisabled(bool disabled)
{