about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-06-04 21:59:01 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-06-04 21:59:01 -0700
commit7de9d457eb2886998cf0cbdd84892f4a4bcecce4 (patch)
tree134058e15bf838eeee1a5bdd9c31ce3c0b7a1a77
parent73bbe731c57dfeec5dbd70e9279fa1ee028d2cd8 (diff)
downloadmu-7de9d457eb2886998cf0cbdd84892f4a4bcecce4.tar.gz
.
Menu when cursor is within a function.
-rw-r--r--shell/global.mu24
1 files changed, 24 insertions, 0 deletions
diff --git a/shell/global.mu b/shell/global.mu
index de9a27cc..64f2a625 100644
--- a/shell/global.mu
+++ b/shell/global.mu
@@ -192,6 +192,30 @@ fn render-globals screen: (addr screen), _self: (addr global-table), show-cursor
 }
 
 fn render-globals-menu screen: (addr screen), _self: (addr global-table) {
+  var _width/eax: int <- copy 0
+  var height/ecx: int <- copy 0
+  _width, height <- screen-size screen
+  var width/edx: int <- copy _width
+  var y/ecx: int <- copy height
+  y <- decrement
+  var height/ebx: int <- copy y
+  height <- increment
+  clear-rect screen, 0/x, y, width, height, 0xc5/bg=blue-bg
+  set-cursor-position screen, 0/x, y
+  draw-text-rightward-from-cursor screen, " ^r ", width, 0/fg, 0x5c/bg=menu-highlight
+  draw-text-rightward-from-cursor screen, " run main  ", width, 7/fg, 0xc5/bg=blue-bg
+  draw-text-rightward-from-cursor screen, " ^s ", width, 0/fg, 0x5c/bg=menu-highlight
+  draw-text-rightward-from-cursor screen, " run sandbox  ", width, 7/fg, 0xc5/bg=blue-bg
+  draw-text-rightward-from-cursor screen, " ^g ", width, 0/fg, 0x5c/bg=menu-highlight
+  draw-text-rightward-from-cursor screen, " go to  ", width, 7/fg, 0xc5/bg=blue-bg
+  draw-text-rightward-from-cursor screen, " ^a ", width, 0/fg, 0x5c/bg=menu-highlight
+  draw-text-rightward-from-cursor screen, " <<  ", width, 7/fg, 0xc5/bg=blue-bg
+  draw-text-rightward-from-cursor screen, " ^b ", width, 0/fg, 0x5c/bg=menu-highlight
+  draw-text-rightward-from-cursor screen, " <word  ", width, 7/fg, 0xc5/bg=blue-bg
+  draw-text-rightward-from-cursor screen, " ^f ", width, 0/fg, 0x5c/bg=menu-highlight
+  draw-text-rightward-from-cursor screen, " word>  ", width, 7/fg, 0xc5/bg=blue-bg
+  draw-text-rightward-from-cursor screen, " ^e ", width, 0/fg, 0x5c/bg=menu-highlight
+  draw-text-rightward-from-cursor screen, " >>  ", width, 7/fg, 0xc5/bg=blue-bg
 }
 
 fn edit-globals _self: (addr global-table), key: grapheme, data-disk: (addr disk) {
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243