Browse Source

Header indentation and tuple options for constructor

Sebastian Lohff 1 year ago
parent
commit
6a128e13a6
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      clintermission/climenu.py

+ 5
- 2
clintermission/climenu.py View File

@@ -91,11 +91,14 @@ class CliMenu:
91 91
             self._style = self.default_stye
92 92
 
93 93
         if header:
94
-            self.add_header(header)
94
+            self.add_header(header, indent=False)
95 95
 
96 96
         if options:
97 97
             for option in options:
98
-                self.add_option(option)
98
+                if isinstance(option, tuple):
99
+                    self.add_option(*option)
100
+                else:
101
+                    self.add_option(option)
99 102
 
100 103
     def add_header(self, title, indent=True):
101 104
         for text in title.split('\n'):

Loading…
Cancel
Save