about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-12-06 22:13:48 -0800
committerKartik Agaram <vc@akkartik.com>2020-12-06 22:13:48 -0800
commit026ab21673c0cd90f229d910f045dff27aed3b0f (patch)
tree7c0f69679d1786c42d09de1ec5f7c4d91f152236
parent35898016ac6fd2d85ebc7ef0056124e30d455e30 (diff)
downloadmu-026ab21673c0cd90f229d910f045dff27aed3b0f.tar.gz
7346
-rw-r--r--apps/tile/environment.mu27
1 files changed, 25 insertions, 2 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index 5c17a97d..c64c3b0b 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -1338,6 +1338,27 @@ fn render _env: (addr environment) {
   position-cursor screen, env
 }
 
+# draw a wordstar-style cheatsheet of shortcuts on the bottom line of the screen
+fn render-menu _env: (addr environment) {
+  var env/esi: (addr environment) <- copy _env
+  var cursor-function-ah/eax: (addr handle function) <- get env, cursor-function
+  var cursor-function/eax: (addr function) <- lookup *cursor-function-ah
+  {
+    compare cursor-function, 0
+    break-if-=
+    render-function-menu env
+    return
+  }
+  var cursor-sandbox-ah/eax: (addr handle sandbox) <- get env, cursor-sandbox
+  var cursor-sandbox/eax: (addr sandbox) <- lookup *cursor-sandbox-ah
+  {
+    compare cursor-sandbox, 0
+    break-if-=
+    render-sandbox-menu env
+    return
+  }
+}
+
 # HACK: areas currently responsible for positioning their dialogs' cursors. So
 # we just do nothing here if a dialog is up.
 fn position-cursor screen: (addr screen), _env: (addr environment) {
@@ -1899,8 +1920,10 @@ fn render-column screen: (addr screen), functions: (addr handle function), bindi
   return right-col
 }
 
-# wordstar-style cheatsheet of shortcuts
-fn render-menu _env: (addr environment) {
+fn render-function-menu _env: (addr environment) {
+}
+
+fn render-sandbox-menu _env: (addr environment) {
   var env/esi: (addr environment) <- copy _env
   var screen-ah/edi: (addr handle screen) <- get env, screen
   var _screen/eax: (addr screen) <- lookup *screen-ah