Full support for adding movies with drop downs!

This commit is contained in:
2023-08-08 10:50:04 -06:00
parent 3b5b92369d
commit 8f6505bb1e
8 changed files with 210 additions and 75 deletions
+8
View File
@@ -273,6 +273,14 @@ impl HorizontallyScrollableText {
pub fn reset_offset(&self) {
*self.offset.borrow_mut() = 0;
}
pub fn scroll_or_reset(&self, width: usize, is_current_selection: bool) {
if is_current_selection && self.text.len() > width {
self.scroll_text();
} else {
self.reset_offset();
}
}
}
#[derive(Clone)]