about summary refs log tree commit diff stats
path: root/baremetal/shell/trace.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-02-23 08:22:46 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-02-23 08:22:46 -0800
commita230aca7fa00e227b0b569325f7df20426e1891e (patch)
tree5d73e2e69d6d97bba25fb941cfeac60bf53e28ae /baremetal/shell/trace.mu
parent2812e206085e8de6e40d1af1fa2e41bb57a58021 (diff)
downloadmu-a230aca7fa00e227b0b569325f7df20426e1891e.tar.gz
7794
Diffstat (limited to 'baremetal/shell/trace.mu')
-rw-r--r--baremetal/shell/trace.mu17
1 files changed, 17 insertions, 0 deletions
diff --git a/baremetal/shell/trace.mu b/baremetal/shell/trace.mu
index 4914fdbf..6be6360b 100644
--- a/baremetal/shell/trace.mu
+++ b/baremetal/shell/trace.mu
@@ -319,6 +319,23 @@ fn test-render-trace-cursor-in-single-line {
   check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "      ", "F - test-render-trace-cursor-in-single-line/2/cursor"
 }
 
+fn render-trace-menu screen: (addr screen) {
+  var width/eax: int <- copy 0
+  var height/ecx: int <- copy 0
+  width, height <- screen-size screen
+  var y/ecx: int <- copy height
+  y <- decrement
+  set-cursor-position screen, 0/x, y
+  draw-text-rightward-from-cursor screen, " ctrl-s ", width, 0/fg, 7/bg=grey
+  draw-text-rightward-from-cursor screen, " run sandbox  ", width, 7/fg, 0/bg
+  draw-text-rightward-from-cursor screen, " ctrl-d ", width, 0/fg, 7/bg=grey
+  draw-text-rightward-from-cursor screen, " cursor down  ", width, 7/fg, 0/bg
+  draw-text-rightward-from-cursor screen, " ctrl-u ", width, 0/fg, 7/bg=grey
+  draw-text-rightward-from-cursor screen, " cursor up  ", width, 7/fg, 0/bg
+  draw-text-rightward-from-cursor screen, " tab ", width, 0/fg, 3/bg=cyan
+  draw-text-rightward-from-cursor screen, " move to sandbox  ", width, 7/fg, 0/bg
+}
+
 fn edit-trace _self: (addr trace), key: grapheme {
   var self/esi: (addr trace) <- copy _self
   # cursor down