diff options
author | Akshay <[email protected]> | 2021-05-24 17:57:41 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-05-24 17:57:41 +0100 |
commit | bfe6a86bd5b1d02988dbd9a3bb5759854d76a050 (patch) | |
tree | 2f7025562203b79bac65080bcc5f72a0d7787343 /src/lisp | |
parent | 02c8475c9dd8ac589054a39d5ae01b565062dbe6 (diff) |
basic primitives to repeat last paint oprepeat
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 dddce5f..ce3f97b 100644 --- a/src/lisp/prelude.rs +++ b/src/lisp/prelude.rs | |||
@@ -536,6 +536,15 @@ pub fn new_env() -> Result<Environment, LispError> { | |||
536 | ])) | 536 | ])) |
537 | }); | 537 | }); |
538 | 538 | ||
539 | primitive!(env, Arity::Exact(0), "active-color", |_, app| { | ||
540 | Ok(LispExpr::BoolLit(app.active_color)) | ||
541 | }); | ||
542 | |||
543 | primitive!(env, Arity::Exact(1), "set-active-color!", |args, app| { | ||
544 | app.active_color = args[0].cast_bool(); | ||
545 | Ok(LispExpr::Unit) | ||
546 | }); | ||
547 | |||
539 | primitive!(env, Arity::Exact(2), "range", |args, _| { | 548 | primitive!(env, Arity::Exact(2), "range", |args, _| { |
540 | if type_match!( | 549 | if type_match!( |
541 | args, | 550 | args, |