Header indentation and tuple options for constructor
This commit is contained in:
parent
2f2049bfef
commit
6a128e13a6
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue