ImGui: Rect always gets drawn on top

If I draw an ImGui Rect and add some Text after it, the Rect always gets drawn on top of the text, even though it came before in the context.

Maybe there is some good reason, but its not obvious why it should happen.

This is in ImGui Stride.

imgui-text-over-rectangle.vl (9.9 KB)

Seems like we would need a way to split the drawList in vvvv for this: How do I draw the content over the filled rect? · Issue #7291 · ocornut/imgui · GitHub

Although I am still not sure why the Rect behaves differently to all other ImGui widgets.

Hi seltzdesign,

yes, the Rect and other ImGui primitives are from the ImGui.Primitives category, these behave differently from the Widgets.

Look:

imgui-text-over-rectangle-withDrawList.vl (11.1 KB)

Best,
Anton

4 Likes

This probably deserves a help patch

3 Likes