mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-27 19:26:09 +00:00
Merge pull request #204 from xliiv/focus_index_for_linear_layout
Add LinearLayout.get_focus_index
This commit is contained in:
commit
bbc3d3d5b7
@ -145,6 +145,11 @@ impl LinearLayout {
|
|||||||
self.invalidate();
|
self.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns index of focused inner view
|
||||||
|
pub fn get_focus_index(&self) -> usize {
|
||||||
|
self.focus
|
||||||
|
}
|
||||||
|
|
||||||
// Invalidate the view, to request a layout next time
|
// Invalidate the view, to request a layout next time
|
||||||
fn invalidate(&mut self) {
|
fn invalidate(&mut self) {
|
||||||
self.cache = None;
|
self.cache = None;
|
||||||
|
Loading…
Reference in New Issue
Block a user