diff options
| author | eunhhu <[email protected]> | 2026-10-18 20:54:17 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-18 20:54:17 +0100 |
| commit | 4d9598e7d0d6d45bf3db9305d365bd2967481bcd (patch) | |
| tree | 59a1b7c945eef69bf9098523c33dc3b8c29c1312 /surfaces/draw.c | |
| parent | 991403f164bef7dcf07b053900367a8f0a60ae6c (diff) | |
| download | vega-4d9598e7d0d6d45bf3db9305d365bd2967481bcd.tar.gz vega-4d9598e7d0d6d45bf3db9305d365bd2967481bcd.zip | |
Send every input as a message (Pure 027's 4d): keys, text, timers, frames and pointing go to the inputs bound to them; a key's press then its release when a message takes it; vega_frame sends dt 1/60 to the frame input, deferring the save as frames were; a table's pointer is the input pointing at it, sent the item's position; a key's handler found by its input's number
Diffstat (limited to 'surfaces/draw.c')
| -rw-r--r-- | surfaces/draw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/surfaces/draw.c b/surfaces/draw.c index 3135705..e02a4ec 100644 --- a/surfaces/draw.c +++ b/surfaces/draw.c @@ -523,9 +523,9 @@ void vega_draw(VegaGrid *grid, PureApp *app, const VegaScreen *screen, const cha Pen help = pen_at(grid, bottom, 0, grid->width, VEGA_MUTED, false, false); if (screen->prompt >= 0) write_cstr(&help, typing ? "Tab keys " : "Tab type "); for (uint32_t i = 0; i < m->inputs; ++i) { - if (m->input[i].kind != PURE_KIND_KEY) continue; + if (m->input[i].binding != PURE_BIND_PRESS) continue; bool bound = false; - for (uint32_t h = 0; h < m->handlers && !bound; ++h) bound = m->handler[h].event == 1 + 2 * i; + for (uint32_t h = 0; h < m->handlers && !bound; ++h) bound = m->handler[h].event == i; if (!bound) continue; write_cstr(&help, key_symbol(m->input_keys[i])); write_cstr(&help, " "); |
