Crate cartographer_rs

source ·
Expand description

A menu builder for Terminal User Interfaces with searching and arrow key navigation

Use the menu_item! and menu! macros for the best effect

Example

use cartographer_rs::{menu, menu_item};
let menu = menu!(
      "Pick a number: ",
      [
          menu_item!("Item Number 1", true, 1),
          menu_item!("Item Number 2", false, 2, ["death"]),
          menu_item!("Item Number 3", true, 3),
          menu_item!("Item Number 5", true, 5, ["80", "5"])
      ]
  );


// Returns the string of the item given
let usr_selection = menu.serve()?;

Macros

Structs

  • The Menu struct that contains the information and functions for displaying the menus
  • A data structure representing a line-item in a menu
  • Controls and characters that can be configured to change the way the menu acts and displays