You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Back-ends: imgui_impl_glfw.cpp + imgui_impl_vulkan_with_textures.cpp
Compiler: MSVC
Operating System: Windows 11
My Issue:
Currently when setting a button to be disabled, it does prevent the user from clicking it, and it doesn't respond to hover / focus. But at the moment it doesn't change the text color to the disabled color (ImGuiCol_TextDisabled).
While it's simple to hack around this (just set ImGuiCol_Text to have the same value as ImGuiCol_TextDisabled), it's not the expected behavior.
As per #4478 (comment) and generally #211 the existence of ImGuiCol_TextDisabled became a little inconsistent with the new BeginDisabled()/EndDisabled() API. Generally we don't expect ImGuiCol_TextDisabled to be used much (until we redesign styling).
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, disableButton); is an internal/documented API which only alter interactions.
See the comment
ImGuiItemFlags_Disabled = 1 << 2, // Disable interactions but doesn't affect visuals. See BeginDisabled()/EndDisabled(). See github.com/ocornut/imgui/issues/211
You should use BeginDisabled()/EndDisabled() it will have an effect on all colors.
Version/Branch of Dear ImGui:
Version: 1.87 (18701)
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_vulkan_with_textures.cpp
Compiler: MSVC
Operating System: Windows 11
My Issue:
Currently when setting a button to be disabled, it does prevent the user from clicking it, and it doesn't respond to hover / focus. But at the moment it doesn't change the text color to the disabled color (
ImGuiCol_TextDisabled
).While it's simple to hack around this (just set
ImGuiCol_Text
to have the same value asImGuiCol_TextDisabled
), it's not the expected behavior.Example code to reproduce:
The text was updated successfully, but these errors were encountered: