Skip to content

Instantly share code, notes, and snippets.

@kadirmalak
Created March 4, 2018 17:36
Show Gist options
  • Save kadirmalak/6a96b49097040eac48ec97b080488a56 to your computer and use it in GitHub Desktop.
Save kadirmalak/6a96b49097040eac48ec97b080488a56 to your computer and use it in GitHub Desktop.
.ellipse method call changed to .rect method on the last line
(defn -draw [this] ;; override draw() method
(if (.-mousePressed this)
(.fill this 0)
(.fill this 255))
(let [x (.-mouseX this)
y (.-mouseY this)
width 80
height 80]
(.rect this x y width height))) ;; changed .ellipse to .rect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment