diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-06-17 23:11:00 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-06-17 23:11:00 -0700 |
commit | a7f77285e89183f4b2225bf93cdca3a04a087731 (patch) | |
tree | f1796365b1834657c76528df64ae69b757533c56 | |
parent | 3003652032b4c77b46a51dc483770b791e229cdb (diff) | |
download | mu-a7f77285e89183f4b2225bf93cdca3a04a087731.tar.gz |
1588 - undo 1587
-rw-r--r-- | edit.mu | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/edit.mu b/edit.mu index fa7b8dc5..85250b27 100644 --- a/edit.mu +++ b/edit.mu @@ -1,15 +1,5 @@ # Editor widget: takes a string and screen coordinates, modifying them in place. -container editable-recipe [ - title:editable - body:editable - top:number - left:number - bottom:number - right:number - lines:address:array:address:duplex-list -] - recipe main [ default-space:address:array:location <- new location:type, 30:literal switch-to-display @@ -18,8 +8,6 @@ recipe main [ divider:number, _ <- divide-with-remainder width:number, 2:literal draw-vertical 0:literal/screen, divider:number, 0:literal/top, height:number # shorten bottom border and darken to make it seem thinner - move-cursor 0:literal/screen, 5:literal/row, 0:literal/column - print-character 0:literal/screen, 93:literal/close-bracket, 245:literal/grey border-left:number <- multiply divider:number, 0.2 border-right:number <- multiply divider:number, 0.8 draw-horizontal 0:literal/screen, 5:literal/row, border-left:number, border-right:number, 241:literal/grey @@ -66,20 +54,11 @@ recipe render [ left:number <- next-ingredient bottom:number <- next-ingredient right:number <- next-ingredient - # render title - move-cursor screen:address, top:number, left:number - title:address:array:character <- new [recipe ] - print-string screen:address, title:address:array:character, 245:literal/grey - title:address:array:character <- new [title] - print-string screen:address, title:address:array:character, 515:literal/yellow/underline - print-character screen:address, 32:literal/space - print-character screen:address, 91:literal/open-bracket, 245:literal/grey # traversing inside s len:number <- length s:address:array:character/deref i:number <- copy 0:literal # traversing inside screen - row:number <- add top:number, 1:literal - left:number <- add left:number, 2:literal + row:number <- copy top:number column:number <- copy left:number move-cursor screen:address, row:number, column:number { |