Keyboard input, text input elements
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user