Created
September 18, 2012 20:40
-
-
Save cassiel/3745719 to your computer and use it in GitHub Desktop.
Puffdraw Bad Code 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn bucket-add | |
"Cycle a new button/x/y into the point stash and force redraw. | |
Unlike the original Javascript, we | |
add to the front and remove from the end. | |
" | |
[me state] | |
(let [old (.-point_stash me)] | |
(set! (.-point_stash me) (cons state (drop-last old))) | |
(stash me state) | |
(.redraw (.-mgraphics me)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment