pub fn show_notes(mut page: usize, notes: Vec<(usize, String)>, message: String) {
    loop {
        // Clear the screen and sets colors
        println!("{}{}{}", get_color(1), get_color(2), termion::clear::All);

        page = check_page_number(page, true);

        if page > 0 {
            g_set_mode(s!("notes"));
            print_notes(&get_page_notes(page));
        } else {
            print_notes(&notes)
        }

        if page > 0 {
            g_set_page(page);
            show_page_indicator(page);
        } else if !message.is_empty() {
            p!(format!("\n{}", message))
        }

        show_menu();
    }
}
// Main renderer function
// Shows the notes and the menu at the bottom
// Then waits and reacts for input
Main renderer function
Shows the notes and the menu at the bottom
Then waits and reacts for input
Main renderer function Shows the notes and the menu at the bottom Then waits and reacts for input
pub fn show_notes(mut page: usize, notes: Vec<(usize, String)>, message: String) {
    loop {
        // Clear the screen and sets colors
        println!("{}{}{}", get_color(1), get_color(2), termion::clear::All);
        page = check_page_number(page, true);
        if page > 0 {
            g_set_mode(s!("notes"));
            print_notes(&get_page_notes(page));
        } else {
            print_notes(&notes)
        }
        if page > 0 {
            g_set_page(page);
            show_page_indicator(page);
        } else if !message.is_empty() {
            p!(format!("\n{}", message))
        }
        show_menu();
    }
}
pub fn show_notes ( mut page : usize , notes : Vec < ( usize , String ) > , message : String ) { loop { // Clear the screen and sets colors println ! ( " " get_color ( 1 ) get_color ( 2 ) termion clear All ) ; page = check_page_number ( page , true ) ; if page > 0 { g_set_mode ( s ! ( " " ) ) ; print_notes ( & get_page_notes ( page ) ) ; } else { print_notes ( & notes ) } if page > 0 { g_set_page ( page ) ; show_page_indicator ( page ) ; } else if ! message . is_empty ( ) { p ! ( format ( " \n " message ) ) } show_menu ( ) ; } }
Main renderer function
Shows the notes and the menu at the bottom
Then waits and reacts for input
Main renderer function Shows the notes and the menu at the bottom Then waits and reacts for input
page
usize
notes
Vec<(usize, String)>
message
String