diff options
author | David Thompson <dthompson@vistahigherlearning.com> | 2022-10-30 21:25:15 -0400 |
---|---|---|
committer | David Thompson <dthompson@vistahigherlearning.com> | 2022-10-30 21:25:15 -0400 |
commit | 2a5f8fad86d78adc82fa8c7cd94f3fe854dee025 (patch) | |
tree | 5bcda9c4959da5c5dd29327d2e621ff50ec73ab9 /apple-town-fair/dialog-box.scm | |
parent | a20d05376cb2de636abebd64da3eeb6c7e8c7bac (diff) |
Day 2 progress.
Diffstat (limited to 'apple-town-fair/dialog-box.scm')
-rw-r--r-- | apple-town-fair/dialog-box.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apple-town-fair/dialog-box.scm b/apple-town-fair/dialog-box.scm index 0731e72..22565bd 100644 --- a/apple-town-fair/dialog-box.scm +++ b/apple-town-fair/dialog-box.scm @@ -35,13 +35,16 @@ #:name 'label #:rank 1 #:font monogram-font - #:vertical-align 'top - #:text (text dialog))) + #:vertical-align 'top)) (set! (width dialog) (width (& dialog background))) (set! (height dialog) (height (& dialog background))) + (refresh-label dialog)) + +(define-method (refresh-label (dialog <dialog-box>)) + (set! (text (& dialog label)) (text dialog)) (teleport (& dialog label) 10.0 (- (height dialog) 10.0))) (define-method (on-change (dialog <dialog-box>) slot old new) (case slot ((text) - (set! (text (& dialog label)) new)))) + (refresh-label dialog)))) |