Header indentation and tuple options for constructor

This commit is contained in:
Sebastian Lohff 2019-02-13 10:18:26 +01:00
parent 2f2049bfef
commit 6a128e13a6
1 changed files with 5 additions and 2 deletions

View File

@ -91,10 +91,13 @@ 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:
if isinstance(option, tuple):
self.add_option(*option)
else:
self.add_option(option)
def add_header(self, title, indent=True):