diff options
author | David Thompson <dthompson2@worcester.edu> | 2022-07-31 12:42:52 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2022-07-31 12:42:52 -0400 |
commit | b75edd152f20a5a8ff88149e7cd2b182040b27f6 (patch) | |
tree | 194a4eb64211a2aa91402a84cee4e3772cd1821a | |
parent | db3a517ff1dc820abc160be7cae39c18fc7564f1 (diff) |
node-2d: Add resize method.
-rw-r--r-- | starling/node-2d.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/starling/node-2d.scm b/starling/node-2d.scm index 8c48966..b46b454 100644 --- a/starling/node-2d.scm +++ b/starling/node-2d.scm @@ -84,6 +84,7 @@ bounding-box on-child-resize dirty! + resize move-by move-to teleport @@ -476,6 +477,10 @@ (on-child-resize (parent node) node))) (set! (dirty-bounding-box? node) #t)))) +(define-method (resize (node <node-2d>) w h) + (set! (width node) w) + (set! (height node) h)) + ;; Animation helpers (define-method (move-to (node <node-2d>) x y) |