add(widget/Input): widget for user inputs
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m22s

Accepts optional label and placeholders which are rendered accordingly.
The widget only is interactable if it is active. Hence it needs further
control from the outside scope where it is used (likely a corresponding
layout). This also applies to the inputed value, which needs to be
received from the within the owning layout to be used for further
processing (i.e. in custom user events, etc.).
This commit is contained in:
2024-12-27 11:34:51 +01:00
parent 3a989321fc
commit 2ef59ca9ea
3 changed files with 244 additions and 1 deletions

View File

@@ -296,7 +296,6 @@ pub fn App(comptime E: type, comptime R: fn (comptime bool) type, comptime fulls
};
this.postEvent(.{ .key = key });
},
'I' => this.postEvent(.{ .focus = true }),
'O' => this.postEvent(.{ .focus = false }),
// 'M', 'm' => return parseMouse(sequence), // TODO: parse mouse inputs