mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-10 19:03:30 +00:00
ImGui ReadOnly flag causes freezing in all widgets #6758
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#6758
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version: 1.89.2
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: rlImGui
Operating System: Linux Mint 21.1 Vera
My Issue/Question:
When creating a ReadOnly SliderFloat and press it while it is at a read only state, every imgui widget being rendered in the main window/process gets unresponsive.
Screenshots/Video
https://github.com/ocornut/imgui/assets/60551627/a20ea7a1-f7b8-4af5-83e9-438752d67fd3
Standalone, minimal, complete and verifiable example:
Thank you Luis for reporting.
AFAIK this has never worked on Sliders from the first commit this was introduced (
fdc526e8f) - the commit wanted it to Drags.ImGuiSliderFlags_ReadOnlyis an undocumented flag from imgui_internal.h which was initially designed for a specific use ofDragFloat(). For consistency I will fix this however I reckon you should be usingBeginDisabled()/EndDisabled()instead?ReadOnly is internal and meant to provide a specific behavior of allowing hovering/highlight but preventing edits.
Disabled mode will prevent both together.
Thank you, I will use Begin Disabled instead.
I have also pushed the fix now with
f93d0be, but I may removeImGuiSliderFlags_ReadOnlyin the future and instead promote using generic item flagsImGuiItemFlags_ReadOnlybut it's not widely supported yet.