Refactored to require handlers to specify the components they rely on and to specify when they are ready. This fixes a lot of bugs with the UI when users try to press buttons while the application is still loading.

This commit is contained in:
2024-07-17 19:55:10 -06:00
parent 9104b7c356
commit d84e7dfcab
49 changed files with 5143 additions and 265 deletions
+12
View File
@@ -41,6 +41,18 @@ mod tests {
assert_str_eq!(scrollable_text.get_text(), test_text);
}
#[test]
fn test_scrollable_text_is_empty() {
let scrollable_text = ScrollableText::default();
assert!(scrollable_text.is_empty());
let test_text = "Test \nString";
let scrollable_text = ScrollableText::with_string(test_text.to_owned());
assert!(!scrollable_text.is_empty());
}
#[test]
fn test_scrollable_text_scroll() {
let mut scrollable_text = ScrollableText::with_string("Test \nString".to_owned());