conditionally display cursor on function side
Always shows at top-most function. Can't actually do any editing yet.
This commit is contained in:
parent
1f05bdcc34
commit
2177b38a68
|
@ -26,7 +26,7 @@ fn render-environment screen: (addr screen), _self: (addr environment) {
|
||||||
var cursor-in-globals-a/eax: (addr boolean) <- get self, cursor-in-globals?
|
var cursor-in-globals-a/eax: (addr boolean) <- get self, cursor-in-globals?
|
||||||
var cursor-in-globals?/eax: boolean <- copy *cursor-in-globals-a
|
var cursor-in-globals?/eax: boolean <- copy *cursor-in-globals-a
|
||||||
var globals/ecx: (addr global-table) <- get self, globals
|
var globals/ecx: (addr global-table) <- get self, globals
|
||||||
render-globals screen, globals
|
render-globals screen, globals, cursor-in-globals?
|
||||||
var sandbox/edx: (addr sandbox) <- get self, sandbox
|
var sandbox/edx: (addr sandbox) <- get self, sandbox
|
||||||
var cursor-in-sandbox?/ebx: boolean <- copy 1/true
|
var cursor-in-sandbox?/ebx: boolean <- copy 1/true
|
||||||
cursor-in-sandbox? <- subtract cursor-in-globals?
|
cursor-in-sandbox? <- subtract cursor-in-globals?
|
||||||
|
|
|
@ -112,7 +112,7 @@ fn write-globals out: (addr stream byte), _self: (addr global-table) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# globals layout: 1 char padding, 41 code, 1 padding, 41 code, 1 padding = 85 chars
|
# globals layout: 1 char padding, 41 code, 1 padding, 41 code, 1 padding = 85 chars
|
||||||
fn render-globals screen: (addr screen), _self: (addr global-table) {
|
fn render-globals screen: (addr screen), _self: (addr global-table), show-cursor?: boolean {
|
||||||
clear-rect screen, 0/xmin, 0/ymin, 0x55/xmax, 0x2f/ymax=screen-height-without-menu, 0xdc/bg=green-bg
|
clear-rect screen, 0/xmin, 0/ymin, 0x55/xmax, 0x2f/ymax=screen-height-without-menu, 0xdc/bg=green-bg
|
||||||
var self/esi: (addr global-table) <- copy _self
|
var self/esi: (addr global-table) <- copy _self
|
||||||
compare self, 0
|
compare self, 0
|
||||||
|
@ -164,16 +164,17 @@ fn render-globals screen: (addr screen), _self: (addr global-table) {
|
||||||
compare y, y2
|
compare y, y2
|
||||||
{
|
{
|
||||||
break-if->=
|
break-if->=
|
||||||
x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 1/padding-left, y1, 0x2a/xmax, 0x2f/ymax, 0/no-cursor, 7/fg=definition, 0xc5/bg=blue-bg
|
x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 1/padding-left, y1, 0x2a/xmax, 0x2f/ymax, show-cursor?, 7/fg=definition, 0xc5/bg=blue-bg
|
||||||
y <- add 2
|
y <- add 2
|
||||||
copy-to y1, y
|
copy-to y1, y
|
||||||
break $render-globals:render-global
|
break $render-globals:render-global
|
||||||
}
|
}
|
||||||
x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 0x2b/xmin, y2, 0x54/xmax, 0x2f/ymax, 0/no-cursor, 7/fg=definition, 0xc5/bg=blue-bg
|
x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 0x2b/xmin, y2, 0x54/xmax, 0x2f/ymax, show-cursor?, 7/fg=definition, 0xc5/bg=blue-bg
|
||||||
y <- add 2
|
y <- add 2
|
||||||
copy-to y2, y
|
copy-to y2, y
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
copy-to show-cursor?, 0/false
|
||||||
curr-index <- decrement
|
curr-index <- decrement
|
||||||
loop
|
loop
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user