36 lines
1,016 B
Racket
36 lines
1,016 B
Racket
#|-----------------------------------------|
|
|
| Entry for the Spring Lisp Game Jam 2024 |
|
|
| Title: <TODO> |
|
|
| Genre: Procedural text adventure |
|
|
| Author: kiefac (homie@tensi.org) |
|
|
| Start date: 2024-18-5 |
|
|
| End date: <TODO> |
|
|
|-----------------------------------------|#
|
|
#lang racket/gui
|
|
(require racket/gui/easy
|
|
racket/gui/easy/operator)
|
|
|
|
(define mono (send the-font-list find-or-create-font 12 'modern 'normal 'normal))
|
|
(define/obs @log "Test field\n")
|
|
(define/obs @input "Type here...")
|
|
|
|
(define (text-entered event content)
|
|
(when (eqv? event 'return)
|
|
(:= @log (~a (obs-peek @log) content "\n"))))
|
|
|
|
(render
|
|
(window
|
|
(hpanel
|
|
(vpanel
|
|
(input @log
|
|
#:enabled? #f
|
|
#:style '(multiple)
|
|
#:min-size '(600 400)
|
|
#:font mono)
|
|
(input @input
|
|
text-entered
|
|
#:enabled? #t
|
|
#:style '(single)
|
|
#:font mono))
|
|
(vpanel
|
|
)))) |