Skip to content

Commit

Permalink
Merge pull request #703 from gucio321/image-fix
Browse files Browse the repository at this point in the history
ImageWidget: fix OnClick method
  • Loading branch information
gucio321 authored Sep 23, 2023
2 parents fcf5e15 + 9a0516c commit 65bce2a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions ImageWidgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ func (i *ImageWidget) Build() {
cursorPos := GetCursorScreenPos()
mousePos := GetMousePos()

mousePos = mousePos.Add(cursorPos)

if cursorPos.X <= mousePos.X && cursorPos.Y <= mousePos.Y &&
cursorPos.X+int(i.width) >= mousePos.X && cursorPos.Y+int(i.height) >= mousePos.Y {
i.onClick()
Expand Down

0 comments on commit 65bce2a

Please sign in to comment.