anchor.diff:  
     ;;(format t "win: ~A mouse: ~A x: ~A y: ~A button: ~A state: ~A clicks: ~A ts: ~A~%" win mouse x y button state clicks ts)
   
  -  (map-event (lambda (k v)
  -	       (let ((collisions (check-intersect (car (children k)) k x y *viewport* *projection*)))
  -		 (when collisions (funcall v k collisions))))
  -	     *on-click-objects*))
  +  (let ((event (list win mouse x y button state clicks ts)))
  +
  +    (map-event (lambda (k v)
  +		 (let ((collisions (check-intersect (car (children k)) k x y *viewport* *projection*)))
  +		   (when collisions
  +		     (setf *last-mouse-down-target* k)
  +		     (funcall v k collisions (cons :mouse-down event)))))
  +	       *on-mouse-down-objects*)))
  +
  +(clinch:defevent clinch:*on-mouse-up* (win mouse x y button state clicks ts)
  +
  +  ;;(format t "win: ~A mouse: ~A x: ~A y: ~A button: ~A state: ~A clicks: ~A ts: ~A~%" win mouse x y button state clicks ts)
  +  (let ((event (list win mouse x y button state clicks ts)))
  +    (map-event (lambda (k v)
  +		 (let ((collisions (check-intersect (car (children k)) k x y *viewport* *projection*)))
  +		   (when collisions
  +		     (when (and
  +			    (eq button *click-button*)
  +			    (eq *last-mouse-down-target* k))
  +		       (let ((f (gethash k *on-mouse-click-objects*)))
  +			 (when f (funcall f k collisions (cons :mouse-click event)))))
  +		     (funcall v k collisions (cons :mouse-up event))
  +		     (setf *last-mouse-down-target* nil))))
  +	       
  +	       *on-mouse-up-objects*)))
  +
   
     ;; (loop for n in *buttons*
     ;;     collect (check-intersect (car (children n)) n x y *viewport* *projection*)))
  
positive.code: 	   :accessor events)))
     
  
  (defparameter *on-click-objects* (make-hash-table))
  (defparameter *on-hover-objects* (make-hash-table))
  (defparameter *on-exit-objects* (make-hash-table))
  (defparameter *last-hover-target* nil)
  
  (defmethod initialize-instance :after ((this button) &key width height events)
    (describe this))
  		   
  
      
  
      
      ;; (unless tex
      ;;   (unless (and width height)
      ;; 	(error "You must have a texture or a width and height!"))
      ;;   (setf tex (make-instance 'texture :width width :height height)))
  
  
      ;; ))
      
      ;; (unless e
      ;;   (setf e (make-quad-for-texture tex :width width :height height)))))	
  
  
  (defun init-test ()
  
negative.code:                      :%y .4
                       :alignment :pango_align_center))))
  
  
  
  
  
  	;; (if (eql mouse-state :dragging)
  	    
  	;;     (multiple-value-bind (d-pos d) (clinch:get-screen-direction (sb-cga:inverse-matrix lens))
  	;;       (let ((trans (calculate-movement d-pos d a-pos a button-start-position button-end-position)))
  		
  	;; 	(map nil (lambda (node start-pos)
  	;; 		   (setf (clinch:transform node)
  	;; 			 (sb-cga:matrix* (sb-cga:translate (clinch:make-vector (elt trans 0) (elt trans 1) (elt trans 2)))
  	;; 					 start-pos)))
  	;; 	     (elt mouse-drag-values 5) mouse-drag-nodes-start-pos)))
  