AllenDang / giu

Cross platform rapid GUI framework for golang based on Dear ImGui.
MIT License
2.16k stars 128 forks source link

[bug] Image widget click detection #702

Closed deepin-pointer closed 9 months ago

deepin-pointer commented 9 months ago

What happend?

Why are we adding cursorPos to mousePos here? https://github.com/AllenDang/giu/blob/fcf5e15ecf9693c3ec08456019d8121629b8c6cd/ImageWidgets.go#L97C14-L97C14

I try to click the top left corner of the image, and mousePos==cursorPos before adding extra cursor Pos image

Code example

See description

To Reproduce

See description

Version

v0.6.1

OS

windows11

gucio321 commented 9 months ago

yeah, something is broken there. Let me check