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) {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user