Keyboard input, text input elements

This commit is contained in:
2026-03-21 01:17:07 -04:00
parent 423df4ae1f
commit 84077b718f
13 changed files with 1451 additions and 52 deletions

View File

@@ -72,6 +72,7 @@ pub struct Style {
pub padding: Edges,
pub background: Option<Color>,
pub pointer_events: bool,
pub focusable: bool,
pub cursor: Option<CursorIcon>,
}
@@ -86,6 +87,7 @@ impl Default for Style {
padding: Edges::ZERO,
background: None,
pointer_events: true,
focusable: false,
cursor: None,
}
}
@@ -198,6 +200,11 @@ impl Element {
self
}
pub fn focusable(mut self, focusable: bool) -> Self {
self.style.focusable = focusable;
self
}
pub fn cursor(mut self, cursor: CursorIcon) -> Self {
self.style.cursor = Some(cursor);
self