diff options
author | David Thompson <dthompson2@worcester.edu> | 2022-12-16 09:23:00 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-01-06 16:00:25 -0500 |
commit | 61892fa6475e49a267e0fa260c783b624a17396c (patch) | |
tree | f9488bbf2bbaaecad944d45882cb66f972d4c33e /community-garden.scm | |
parent | 319c60b0f3e44291eefcb4c68fdf025f605c6d1e (diff) |
Add point-and-click editing.
Diffstat (limited to 'community-garden.scm')
-rw-r--r-- | community-garden.scm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/community-garden.scm b/community-garden.scm index 7cd535a..6d6af5d 100644 --- a/community-garden.scm +++ b/community-garden.scm @@ -6,7 +6,8 @@ (catbird node) (catbird node-2d) (catbird region) - ((catbird scene) #:select (<scene>)) + ((catbird scene) + #:select (<scene> current-scene replace-major-mode)) (chickadee graphics color) (chickadee graphics path) (chickadee math vector) @@ -68,7 +69,7 @@ (alice-plant 6 2 cabbage/approved) (define catbird-visitor - (catbird-run (<- our-garden-community 'register-visitor "Catbird Viewer"))) + (catbird-run (<- our-garden-community 'register-gardener "Catbird Viewer"))) (define catbird-garden-bed (make-atomic-box #f)) (define catbird-garden-name (make-atomic-box #f)) (catbird-run @@ -83,6 +84,7 @@ (let ((region (create-full-region #:name 'main)) (scene (make <scene> #:name 'scratch))) (replace-scene region scene) + (replace-major-mode scene (make <garden-mode>)) (set! (camera region) (make <camera-2d> #:width %window-width @@ -97,10 +99,12 @@ %window-width %window-height)))) (make <garden-view> + #:name 'garden #:vat catbird-vat - #:visitor catbird-visitor + #:user catbird-visitor #:name-box catbird-garden-name - #:garden-bed-box catbird-garden-bed)))) + #:garden-bed-box catbird-garden-bed + #:read-only? #f)))) #:title "Community Garden" #:width %window-width #:height %window-height) |