diff --git a/dg_clt/menus.py b/dg_clt/menus.py index c593a9e..d32357f 100644 --- a/dg_clt/menus.py +++ b/dg_clt/menus.py @@ -1,4 +1,4 @@ -from screen import clear +from dg_clt.screen import clear class Menu: @@ -17,4 +17,10 @@ class Menu: print(f'{key}: {value}') else: print() - print(f'\n{self.selection}') + + def get_input(self): + while True: + self.display() + user_input = input(f'\n{self.selection}') + if user_input in self.menu_items.keys(): + return user_input