diff options
-rw-r--r-- | engine/shell.scm | 39 |
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) |