Skip to content

Commit

Permalink
Fix click event detection
Browse files Browse the repository at this point in the history
  • Loading branch information
SleepyPrince authored Oct 27, 2024
1 parent cdbcd33 commit 1a6cf72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ImageWidgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (i *ImageWidget) Build() {
}

// trick: detect click event
if i.onClick != nil && IsMouseClicked(MouseButtonLeft) && IsWindowFocused(0) {
if i.onClick != nil && IsMouseClicked(MouseButtonLeft) && IsWindowHovered(0) {
cursorPos := GetCursorScreenPos()
mousePos := GetMousePos()

Expand Down

0 comments on commit 1a6cf72

Please sign in to comment.