summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-07-25 15:19:11 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-07-27 17:15:48 +0200
commit4e50fbe48ab53c8e42131593ad876931cd6eb722 (patch)
treeceb40e2edc1e0b5597eafe1097d5d7b24dda52a8
parentd0bda606b6e292c0e0e2ba5717a67a930f634cdb (diff)
engine: Remove eval-prompt from shell.
-rw-r--r--engine/shell.scm39
1 files changed, 1 insertions, 38 deletions
diff --git a/engine/shell.scm b/engine/shell.scm
index d0dd3c7..ae808b0 100644
--- a/engine/shell.scm
+++ b/engine/shell.scm
@@ -76,22 +76,7 @@
(/ %width %scale-factor)
(/ %height %scale-factor) 0 0 1))
(frame-start-time #:accessor frame-start-time)
- (avg-frame-time #:accessor avg-frame-time #:init-value 0.0)
- (eval-prompt #:accessor eval-prompt
- #:init-form (make <node-2d>
- #:name 'eval-prompt
- #:children
- (list
- (make <label>
- #:name 'prompt
- #:font shell-font
- #:text ">"
- #:position (vec2 0.0 0.0))
- (make <label>
- #:name 'source
- #:font shell-font
- #:text "(+ 1 2 3)"
- #:position (vec2 16.0 0.0))))))
+ (avg-frame-time #:accessor avg-frame-time #:init-value 0.0))
(define (error-string stack key args)
(call-with-output-string
@@ -184,37 +169,15 @@ Enter a debugger for the current game loop error."
(define-method (on-quit (shell <shell>))
(abort-game))
-(define-method (toggle-debug-mode (shell <shell>))
- (set! (debug? shell) (not (debug? shell))))
-
-(define-method (toggle-eval-prompt (shell <shell>))
- (let ((eval-prompt (eval-prompt shell)))
- (if (active? eval-prompt)
- (detach eval-prompt)
- (attach (child-ref shell 'debug-overlay)
- eval-prompt))))
-
(define-method (on-key-press (shell <shell>) key mods repeat?)
(match mods
((or ('left-control) ('right-control) ('caps-lock))
(match key
- ('d
- (toggle-debug-mode shell)
- #f)
('q (abort-game))
('r
(reset-game)
#f)
(_ #t)))
- ((or ('left-alt) ('right-alt))
- (match key
- ('x
- (if (debug? shell)
- (begin
- (toggle-eval-prompt shell)
- #f)
- #t))
- (_ #t)))
(_ #t)))
(define-method (update (shell <shell>) dt)