╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2261 } │ │2262 var pos_buf: [128]u8 = undefined; │ │2263 try output.appendSlice(allocator, try std.fmt.bufPrint(&pos_buf, " style=\"left:{d}ch;top:{d}em;width:{d}ch;height:{d}em\"></button>", .{ r.x, r.y, r.size.width, r.size.height })); │ │2264 + } else if (std.mem.startsWith(u8, custom, ui.radio_prefix)) { │ │2265 + // an invisible native radio over the option, checked when the option is its row's selection │ │2266 + const field = custom[ui.radio_prefix.len..]; │ │2267 + const separator = std.mem.indexOfScalar(u8, field, '=') orelse continue; │ │2268 + const row = root_focus.children.get(child.parent_id) orelse continue; │ │2269 + var id_buf: [128]u8 = undefined; │ │2270 + try output.appendSlice(allocator, try std.fmt.bufPrint(&id_buf, "<input type=\"radio\" data-key=\"control:{d}\" data-focus-id=\"{d}\"", .{ id, id })); │ │2271 + try appendFormAttribute(allocator, output, root_focus, id); │ │2272 + try output.appendSlice(allocator, " name=\""); │ │2273 + try appendEscapedHtml(allocator, output, field[0..separator]); │ │2274 + try output.appendSlice(allocator, "\" value=\""); │ │2275 + try appendEscapedHtml(allocator, output, field[separator + 1 ..]); │ │2276 + try output.append(allocator, '"'); │ │2277 + if (row.focus.child_id == id) try output.appendSlice(allocator, " checked"); │ │2278 + var pos_buf: [128]u8 = undefined; │ │2279 + try output.appendSlice(allocator, try std.fmt.bufPrint(&pos_buf, " style=\"opacity:0;left:{d}ch;top:{d}em;width:{d}ch;height:{d}em\">", .{ r.x, r.y, r.size.width, r.size.height }));│ │2280 } else if (std.mem.startsWith(u8, custom, ui.file_input_prefix)) { │ │2281 try output.appendSlice(allocator, "<input type=\"file\" data-preserve-value data-action=\""); │ │2282 try appendEscapedHtml(allocator, output, custom[ui.file_input_prefix.len..]); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯