Skip to content

Commit

Permalink
examples: clear textinput on enter
Browse files Browse the repository at this point in the history
  • Loading branch information
rockorager committed Mar 19, 2024
1 parent 8a5fe1a commit d40fb7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/text_input.zig
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ pub fn main() !void {
vx.queueRefresh();
} else if (key.matches('n', .{ .ctrl = true })) {
try vx.notify("vaxis", "hello from vaxis");
} else if (key.matches(vaxis.Key.enter, .{})) {
text_input.clearAndFree();
} else {
try text_input.update(.{ .key_press = key });
}
Expand Down

0 comments on commit d40fb7c

Please sign in to comment.