Browse Source

Header indentation and tuple options for constructor

option-search
Sebastian Lohff 3 years ago
parent
commit
6a128e13a6
  1. 7
      clintermission/climenu.py

7
clintermission/climenu.py

@ -91,11 +91,14 @@ class CliMenu: @@ -91,11 +91,14 @@ class CliMenu:
self._style = self.default_stye
if header:
self.add_header(header)
self.add_header(header, indent=False)
if options:
for option in options:
self.add_option(option)
if isinstance(option, tuple):
self.add_option(*option)
else:
self.add_option(option)
def add_header(self, title, indent=True):
for text in title.split('\n'):

Loading…
Cancel
Save