Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 1.06 KB

README.md

File metadata and controls

34 lines (27 loc) · 1.06 KB

Menu_generator

This project is a console ui generator without any dependencies, only Python is required.

HOW TO USE

First you need to create an object of Menu_generator class

menu = Menu_generator()

You can pass many arguments to the constructor to customize the menu to your liking

EXAMPLE OF MAIN MENU CREATION

choice = menu.main_menu(**{
    "main": ["Test1", "Test2", "Test3"],
    "side": ["test_side1", "test_side2", "test_side3", "test_side4", "test_side5"]
})

image

The side menu is dynamically generated based on how much entries you pass to it.

EXAMPLE OF SUB MENU CREATION

choice = menu.sub_menu(**{
    "title": ["Test Title"],
    "main": ["test1", "test2", "test3"]
})

image

Both functions display a choice input for user at the end, the recommended return value is int but you can use all the other datatypes too.