diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-04-22 10:08:44 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-04-22 10:08:44 -0400 |
commit | 0ffa5b63dfd8f652f9a0bd31be4973fc0e0ff988 (patch) | |
tree | b7f29808fa5766e93781b711f0fbad835837fe95 | |
parent | b9246716c77b10c6e5b8cbf65ea78653931e5751 (diff) |
node-2d: Add color slot to <label>.
-rw-r--r-- | starling/node-2d.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/starling/node-2d.scm b/starling/node-2d.scm index 9fdc578..f340600 100644 --- a/starling/node-2d.scm +++ b/starling/node-2d.scm @@ -797,7 +797,8 @@ (text #:accessor text #:init-form "" #:init-keyword #:text #:watch? #t) (align #:accessor align #:init-value 'left #:init-keyword #:align #:watch? #t) (vertical-align #:accessor vertical-align #:init-value 'bottom - #:init-keyword #:vertical-align #:watch? #t)) + #:init-keyword #:vertical-align #:watch? #t) + (color #:accessor color #:init-keyword #:color #:init-value white)) (define-method (realign (label <label>)) (set! (origin-x label) @@ -839,7 +840,8 @@ (next-method)))) (define-method (render (label <label>) alpha) - (draw-text* (font label) (text label) (world-matrix label))) + (draw-text* (font label) (text label) (world-matrix label) + #:color (color label))) ;;; |