sketching icon indicating copy to clipboard operation
sketching copied to clipboard

The demo program for `no-cursor` reveals ... something.

Open soegaard opened this issue 3 years ago • 1 comments

The program below ought to show no cursor, when the mouse is pressed, but that doesn't happen.

#lang sketching
;; Press the mouse to hide the cursor

(define (setup)
  (frame-rate 2))

(define (draw)
  (if mouse-pressed
      (no-cursor)
      (cursor 'hand)))

soegaard avatar Jun 21 '21 17:06 soegaard

It seems either racket/gui or macOS doesn't update the cursor until the mouse is moved?

#lang sketching
;; Press the mouse to hide the cursor

(define (setup)
  (frame-rate 2))

(define (draw)
  (background 255)
  (fill 0)
  (text (~a frame-count)   50 5)
  (text (~a mouse-pressed) 50 55)
  (if mouse-pressed
      (begin (cursor 'cross) (display "."))
      (cursor 'hand)))

soegaard avatar Jul 11 '21 08:07 soegaard