mouse-button

mouse-pressed?

mouse-x

mouse-y

pmouse-x

pmouse-y

mouse-button

Arguments
[]
Docstring
The value of the system variable mouseButton is either :left, :right,
or :center depending on which button is pressed. nil if no button pressed
Works only inside sketch functions?
Yes
Original Processing method
mouseButton
Example
(q/background 255)
(q/fill 0)
(doseq [[ind capt fn] [[0 "mouse-button" q/mouse-button]
                       [1 "mouse-pressed?" q/mouse-pressed?]
                       [2 "mouse-x" q/mouse-x] [3 "mouse-y" q/mouse-y]
                       [4 "pmouse-x" q/pmouse-x] [5 "pmouse-y" q/pmouse-y]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example

mouse-pressed?

Arguments
[]
Docstring
Variable storing if a mouse button is pressed. The value of the
system variable mousePressed is true if a mouse button is pressed
and false if a button is not pressed.
Works only inside sketch functions?
Yes
Original Processing method
mousePressed
Example
(q/background 255)
(q/fill 0)
(doseq [[ind capt fn] [[0 "mouse-button" q/mouse-button]
                       [1 "mouse-pressed?" q/mouse-pressed?]
                       [2 "mouse-x" q/mouse-x] [3 "mouse-y" q/mouse-y]
                       [4 "pmouse-x" q/pmouse-x] [5 "pmouse-y" q/pmouse-y]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example

mouse-x

Arguments
[]
Docstring
Current horizontal coordinate of the mouse.
Works only inside sketch functions?
Yes
Original Processing method
mouseX
Example
(q/background 255)
(q/fill 0)
(doseq [[ind capt fn] [[0 "mouse-button" q/mouse-button]
                       [1 "mouse-pressed?" q/mouse-pressed?]
                       [2 "mouse-x" q/mouse-x] [3 "mouse-y" q/mouse-y]
                       [4 "pmouse-x" q/pmouse-x] [5 "pmouse-y" q/pmouse-y]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example

mouse-y

Arguments
[]
Docstring
Current vertical coordinate of the mouse.
Works only inside sketch functions?
Yes
Original Processing method
mouseY
Example
(q/background 255)
(q/fill 0)
(doseq [[ind capt fn] [[0 "mouse-button" q/mouse-button]
                       [1 "mouse-pressed?" q/mouse-pressed?]
                       [2 "mouse-x" q/mouse-x] [3 "mouse-y" q/mouse-y]
                       [4 "pmouse-x" q/pmouse-x] [5 "pmouse-y" q/pmouse-y]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example

pmouse-x

Arguments
[]
Docstring
Horizontal coordinate of the mouse in the previous frame
Works only inside sketch functions?
Yes
Original Processing method
pmouseX
Example
(q/background 255)
(q/fill 0)
(doseq [[ind capt fn] [[0 "mouse-button" q/mouse-button]
                       [1 "mouse-pressed?" q/mouse-pressed?]
                       [2 "mouse-x" q/mouse-x] [3 "mouse-y" q/mouse-y]
                       [4 "pmouse-x" q/pmouse-x] [5 "pmouse-y" q/pmouse-y]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example

pmouse-y

Arguments
[]
Docstring
Vertical coordinate of the mouse in the previous frame
Works only inside sketch functions?
Yes
Original Processing method
pmouseY
Example
(q/background 255)
(q/fill 0)
(doseq [[ind capt fn] [[0 "mouse-button" q/mouse-button]
                       [1 "mouse-pressed?" q/mouse-pressed?]
                       [2 "mouse-x" q/mouse-x] [3 "mouse-y" q/mouse-y]
                       [4 "pmouse-x" q/pmouse-x] [5 "pmouse-y" q/pmouse-y]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example