File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -554,19 +554,26 @@ impl<'a> MultiPageMenu<'a> {
554
554
}
555
555
556
556
pub fn show < T : TryFrom < ApduHeader > > ( & mut self ) -> EventOrPageIndex < T >
557
+ where
558
+ Reply : From < <T as TryFrom < ApduHeader > >:: Error > ,
559
+ {
560
+ self . show_from ( 0 )
561
+ }
562
+
563
+ pub fn show_from < T : TryFrom < ApduHeader > > ( & mut self , page_index : usize ) -> EventOrPageIndex < T >
557
564
where
558
565
Reply : From < <T as TryFrom < ApduHeader > >:: Error > ,
559
566
{
560
567
clear_screen ( ) ;
561
568
562
- self . pages [ 0 ] . place ( ) ;
569
+ self . pages [ page_index ] . place ( ) ;
563
570
564
571
LEFT_ARROW . display ( ) ;
565
572
RIGHT_ARROW . display ( ) ;
566
573
567
574
crate :: ui:: screen_util:: screen_update ( ) ;
568
575
569
- let mut index = 0 ;
576
+ let mut index = page_index ;
570
577
571
578
loop {
572
579
match self . comm . next_event ( ) {
You can’t perform that action at this time.
0 commit comments