This commit adds `modals::Modals::slider()` with the same interface as
`modals::Modals::start_progress()`, with the striking difference that
users can move the slider, and press the center keypad button to confirm
the selection.
Useful for objects like audio volume controls.
the sizing was such that two pages of data had to be prepared
for even very short messages. This change fits the message back
into one page of data once again.
Now you can:
let mut input = std::env::current_dir().unwrap();
input.push("../services/modals/src/tests/bunny.png");
let img = Img::<RGB<u8>>::load(&input).unwrap();
modals.show_image(img).expect("image failed");
change the notification modal to accept the primary message and an
Option of independent text to display as a qrcode
pub fn show_notification(&self, notification: &str, qrtext:Option<&str>) -> Result<(), xous::Error> {}
Progress updates can come at a right too high for the renderer
to keep up, so instead of deadlocking, we discard update messages
that are too frequent.
I think things could be compactified even further, but this is a
first-step "merge the threads and break as few things as possible"
pass. Would like to get @gsora's multi-line boxes merged into this
new system before doing even more optimization.
Added a get_text_multi() method on modals which builds, shows and returns text taken from a modal view with a given amount of fields.
Calling get_text() is equal to a call to get_text_multi() with fields = 1.