diff --git a/ledger_device_sdk/src/ui/gadgets.rs b/ledger_device_sdk/src/ui/gadgets.rs index bb2d5545..f2de19d7 100644 --- a/ledger_device_sdk/src/ui/gadgets.rs +++ b/ledger_device_sdk/src/ui/gadgets.rs @@ -554,19 +554,26 @@ impl<'a> MultiPageMenu<'a> { } pub fn show>(&mut self) -> EventOrPageIndex + where + Reply: From<>::Error>, + { + self.show_from(0) + } + + pub fn show_from>(&mut self, page_index: usize) -> EventOrPageIndex where Reply: From<>::Error>, { clear_screen(); - self.pages[0].place(); + self.pages[page_index].place(); LEFT_ARROW.display(); RIGHT_ARROW.display(); crate::ui::screen_util::screen_update(); - let mut index = 0; + let mut index = page_index; loop { match self.comm.next_event() {