about summary refs log tree commit diff stats
path: root/081print.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-01-21 13:51:50 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-01-22 08:52:28 -0800
commit3151fb2387439475e12a354f2905a77ccb80ca19 (patch)
treeac9d527f475ea677e3fab90b7c1c0cdcf1e2b7ca /081print.mu
parentb35cdb494562feabc600a6eac2913385e507f455 (diff)
downloadmu-3151fb2387439475e12a354f2905a77ccb80ca19.tar.gz
2585 - label sandboxes with a number
It also seems useful that the number maps to the name of the file the
sandbox is saved in. However this mapping is currently a happy accident
and not actually tested.

I'm starting to switch gears and help make the editor useable with
many many sandboxes. This is just the first step of several.
Diffstat (limited to '081print.mu')
-rw-r--r--081print.mu14
1 files changed, 13 insertions, 1 deletions
diff --git a/081print.mu b/081print.mu
index bb2f1636..464e1320 100644
--- a/081print.mu
+++ b/081print.mu
@@ -683,5 +683,17 @@ recipe print-integer screen:address:shared:screen, n:number -> screen:address:sh
 recipe print screen:address:shared:screen, n:number -> screen:address:shared:screen [
   local-scope
   load-ingredients
-  screen <- print-integer screen, n
+  color:number, color-found?:boolean <- next-ingredient
+  {
+    # default color to white
+    break-if color-found?
+    color <- copy 7/white
+  }
+  bg-color:number, bg-color-found?:boolean <- next-ingredient
+  {
+    # default bg-color to black
+    break-if bg-color-found?
+    bg-color <- copy 0/black
+  }
+  screen <- print-integer screen, n, color, bg-color
 ]