Closed samaaron closed 12 years ago
The binding mechanics have changed slightly. A right-click can be used for selecting and binding and left-clicks can be used for manipulating the controls by dragging and clicking. Separating these functionalities became necessary in the case of clicking button elements. When the user clicked on a button, it was not possible to determine if they intended to manipulate it or select it.
I've updated the documentation just now too. :) https://github.com/overtone/mini-beast/wiki/Using-MiniBeast/_compare/ae7f95361a5dcf74f7fa77200bd470ce54022511...53bde8c65a37e48b3e0e396064392fae80cef991
I tried right clicking, but it didn't work on my mac...
The plot thickens. :D I'll take another look at the code.
I've improved the debug output for mouse clicks. Perhaps you can attach a snippet of the log.
I modified mouse-clicked to the following to stop the exceptions:
(defn mouse-clicked []
;; toggle selected-control on mouse click
(case (mouse-button)
:left (if-let [matched-control (control-at-xy (mouse-x) (mouse-y))]
(do
(println "found control " matched-control)
(update-control matched-control 0))
(println "left click at [" (mouse-x) ", " (mouse-y) "]"))
:right (if (nil? @selected-control)
(let [x (mouse-x)
y (mouse-y)
c (control-at-xy x y)]
(println "right click at [" x ", " y "]")
(println "found control " c)
(reset! selected-control c))
(reset! selected-control nil))
nil))
It never prints out "left click at". I'm using a Mac which doesn't have a left click button on the mouse, but typically on OS X left click is obtained by ctl-clicking things. Perhaps this is the issue?
Thanks for the fix :-)
I'm no longer able to click a control, see it highlight red and then bind it with a MIDI controller control :-(