From 4d9598e7d0d6d45bf3db9305d365bd2967481bcd Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sun, 18 Oct 2026 20:54:17 +0100 Subject: 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 --- surfaces/draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'surfaces/draw.c') 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, " "); -- cgit v1.2.3