Browse Source

Add methods to get all available menu options

Sebastian Lohff 10 months ago
parent
commit
58455be58a
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      clintermission/climenu.py

+ 7
- 0
clintermission/climenu.py View File

@@ -118,6 +118,13 @@ class CliMenu:
118 118
 
119 119
         return self._success
120 120
 
121
+    def get_options(self):
122
+        return self._items
123
+
124
+    @property
125
+    def num_options(self):
126
+        return len(self._items)
127
+
121 128
     def get_selection(self):
122 129
         if self.success:
123 130
             item = self._items[self._pos]

Loading…
Cancel
Save