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
ImGui::PushItemFlag(ImGuiItemFlags_ReadOnly, true);
ImGui::ColorEdit4("Color", g_Colour); // Still can be edited in some places.ImGui::PopItemFlag();
I wanted to use ColorEdit as color preview for one of my tool and prevent user to edit it, but doing pushing item flag readonly for coloredit will prevent only the dragfloat inputs, but they still can be edited by double clicking on it and changing the values.
This same behaviour exist when clicking the colorbutton that popups the modal for color editing. This isn't really much issue for me, but couldn't find anyone mention it and might someone use it in future and would be good to have it working.
Here is preview of the issue:
2023-11-30.19-48-22.mp4
The text was updated successfully, but these errors were encountered:
ReadOnly is curfently very partially supported by a few widgets. Note there is a public Disabled flag, used via BeginDisabled()/EndDisabled() which might solve your needs?
I know it is partially supported, just wanted to make issue so it is noted somewhere. Also I don't want to fully disable the widget. I want user to be still able to copy all the colors like RGBA and other formats that can be shown in that modal popup. My only option right now is to make custom widget for that. If the readonly worked as it should I wouldn't need to.
As the title says.
Code example:
I wanted to use ColorEdit as color preview for one of my tool and prevent user to edit it, but doing pushing item flag readonly for coloredit will prevent only the dragfloat inputs, but they still can be edited by double clicking on it and changing the values.
This same behaviour exist when clicking the colorbutton that popups the modal for color editing. This isn't really much issue for me, but couldn't find anyone mention it and might someone use it in future and would be good to have it working.
Here is preview of the issue:
2023-11-30.19-48-22.mp4
The text was updated successfully, but these errors were encountered: