Add textinput focus method
This commit is contained in:
parent
da1a3eed1e
commit
f7d67598cb
@ -716,6 +716,12 @@ impl State {
|
|||||||
pub fn move_cursor_to(&mut self, position: usize) {
|
pub fn move_cursor_to(&mut self, position: usize) {
|
||||||
self.cursor.move_to(position);
|
self.cursor.move_to(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Change the focus of the [`TextInput`] state.
|
||||||
|
/// [`TextInput`]: struct.TextInput.html
|
||||||
|
pub fn focus(&mut self, state: bool) {
|
||||||
|
self.is_focused = state
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Reduce allocations
|
// TODO: Reduce allocations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user