Testing ratatui
This commit is contained in:
parent
28483fe165
commit
843d05bec9
9 changed files with 349 additions and 9 deletions
|
|
@ -95,13 +95,4 @@ impl DashboardViewState {
|
|||
pub fn get_selected_monitor(&self) -> Option<&MonitorViewState> {
|
||||
self.monitors.get(self.selected_index)
|
||||
}
|
||||
|
||||
pub fn move_selection(&mut self, direction: isize) {
|
||||
if self.monitors.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
let new_index = (self.selected_index as isize + direction) as usize;
|
||||
self.selected_index = new_index.clamp(0, self.monitors.len() - 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue