Guest User

Untitled

a guest
Jul 8th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.36 KB | None | 0 0
  1. (defmacro with-key (&body body)
  2.   `(let* ((key (get-key)))
  3.      ,@body))
  4.  
  5. (defmacro with-coordinates ((window x y) &body body)
  6.   `(let* ((old-pos (multiple-value-list (screen:window-cursor-position ,window))))
  7.      (screen:set-window-cursor-position ,window ,x ,y)
  8.      ,@body
  9.      (screen:set-window-cursor-position ,window (car old-pos) (second old-pos))))
Add Comment
Please, Sign In to add comment