about summary refs log tree commit diff stats
path: root/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-12-06 22:16:22 -0800
committerKartik Agaram <vc@akkartik.com>2020-12-06 22:16:22 -0800
commit1626a32f2dc8a74a2dee02f07232ec8ec46c8148 (patch)
treeb744f1e58b73b8ad461cfd49eda6027b06319268 /apps
parent026ab21673c0cd90f229d910f045dff27aed3b0f (diff)
downloadmu-1626a32f2dc8a74a2dee02f07232ec8ec46c8148.tar.gz
7347 - tile: separate sandbox and function menus
Diffstat (limited to 'apps')
-rw-r--r--apps/tile/environment.mu38
1 files changed, 38 insertions, 0 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index c64c3b0b..a1dc11a3 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -1921,6 +1921,44 @@ fn render-column screen: (addr screen), functions: (addr handle function), bindi
 }
 
 fn render-function-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
+  var screen/edi: (addr screen) <- copy _screen
+  var nrows/eax: (addr int) <- get env, nrows
+  move-cursor screen, *nrows, 0
+  start-reverse-video screen
+  print-string screen, " ctrl-q "
+  reset-formatting screen
+  print-string screen, " quit "
+  var sep-col/ecx: (addr int) <- get env, code-separator-col
+  var menu-start/ebx: int <- copy *sep-col
+  menu-start <- subtract 0x30  # 48 = half the size of the menu
+  move-cursor screen, *nrows, menu-start
+  start-reverse-video screen
+  print-string screen, " ctrl-a "
+  reset-formatting screen
+  print-string screen, " ⏮   "
+  start-reverse-video screen
+  print-string screen, " ctrl-b "
+  reset-formatting screen
+  print-string screen, " ◀ word  "
+  start-reverse-video screen
+  print-string screen, " ctrl-f "
+  reset-formatting screen
+  print-string screen, " word ▶  "
+  start-reverse-video screen
+  print-string screen, " ctrl-e "
+  reset-formatting screen
+  print-string screen, " ⏭         "
+  start-reverse-video screen
+  print-string screen, " ctrl-g "
+  reset-formatting screen
+  print-string screen, " go to function  "
+  start-reverse-video screen
+  print-string screen, " tab "
+  reset-formatting screen
+  print-string screen, " go to sandbox  "
 }
 
 fn render-sandbox-menu _env: (addr environment) {