add(examples/elements): mouse clickable button
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
This commit is contained in:
@@ -56,13 +56,14 @@ pub const InputField = struct {
|
||||
|
||||
const row: u16 = 1;
|
||||
const col: u16 = 1;
|
||||
const anchor = (row * size.cols) + col;
|
||||
|
||||
for (this.input.items, 0..) |cp, idx| {
|
||||
cells[(row * size.cols) + col + idx].style.fg = .black;
|
||||
cells[(row * size.cols) + col + idx].cp = cp;
|
||||
cells[anchor + idx].style.fg = .black;
|
||||
cells[anchor + idx].cp = cp;
|
||||
|
||||
// NOTE: do not write over the contents of this `Container`'s `Size`
|
||||
if ((row * size.cols) + col + idx == cells.len - 1) break;
|
||||
if (anchor + idx == cells.len - 1) break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user