sketching
sketching copied to clipboard
The demo program for `no-cursor` reveals ... something.
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)))
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)))