diff options
author | Akshay <[email protected]> | 2021-05-01 08:58:42 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-05-01 08:58:42 +0100 |
commit | 7c311d2449cc81a20a9a3f5e26b71f36be263a0d (patch) | |
tree | 9174eb0fb62c823fa6a7f44edd6f198cfa9bc1b0 /src/lisp | |
parent | 092e187304c596f35b8ef9d7ca71850418d8a05d (diff) |
add minimap/preview box, lisp function to toggle
Diffstat (limited to 'src/lisp')
-rw-r--r-- | src/lisp/prelude.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lisp/prelude.rs b/src/lisp/prelude.rs index 8088510..9330372 100644 --- a/src/lisp/prelude.rs +++ b/src/lisp/prelude.rs | |||
@@ -281,6 +281,15 @@ pub fn new_env() -> Result<Environment, LispError> { | |||
281 | Ok(LispExpr::Unit) | 281 | Ok(LispExpr::Unit) |
282 | }); | 282 | }); |
283 | 283 | ||
284 | primitive!(env, Arity::Exact(0), "minimap-enabled?", |_, app| { | ||
285 | Ok(LispExpr::BoolLit(app.minimap)) | ||
286 | }); | ||
287 | |||
288 | primitive!(env, Arity::Exact(1), "set-minimap!", |args, app| { | ||
289 | app.minimap = args[0].cast_bool(); | ||
290 | Ok(LispExpr::Unit) | ||
291 | }); | ||
292 | |||
284 | primitive!(env, Arity::Exact(0), "grid-rectangle", |_, app| { | 293 | primitive!(env, Arity::Exact(0), "grid-rectangle", |_, app| { |
285 | app.grid.kind = GridKind::Rectangle; | 294 | app.grid.kind = GridKind::Rectangle; |
286 | Ok(LispExpr::Unit) | 295 | Ok(LispExpr::Unit) |