imGUI widget creation and getcursorposition behaviour

hi !
i m in need of a tracking widget for moving head usage (one square space with a cursor to move with xy position). As it seems this kind of widget doesnt exist, i need to create my custom widget, with mouse tracking
But i m blocking on a stupid thing : the context seems not be correctly taken inside my for each loop in imgui. despite for sliders buttons etc, everything works. How can i fix this ?


Thank you !

It’s impossible to say from a screenshot. Please attach a simplified patch showing the issue.

Edit:
ImGui 2dSlider.vl (27.6 KB)

Merci Bjoern its very helpfull !
Helas
i incoporated your sample, my UI is kind of particular with 2 window for my vertical screen UI.

and i think i founded a kind of bug, relativ to window position and size set by Bounds input pin

ImGui 2dSlider Bug.vl (36.8 KB)

@bjoern is it a bug, or i m missing something ?

It’s not a bug.

ImGui 2dSlider.vl (37.9 KB)

@bjoern hum this should not affect the cursor ?
how to handle this window thing ?

It’s shown in the attached patch.

thank you so much @bjoern !