summaryrefslogtreecommitdiff
path: root/apple-town-fair/dialog-box.scm
diff options
context:
space:
mode:
Diffstat (limited to 'apple-town-fair/dialog-box.scm')
-rw-r--r--apple-town-fair/dialog-box.scm9
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))))