index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Werner Llácer <wllacer@gmail.com> | 2022-02-28 16:17:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 16:17:10 +0100 |
commit | f07704529f411b39756a616995c4a3f7725eb550 (patch) | |
tree | da3a368726902ef5b5676c9de1468a79e6ae17f6 /archinstall/lib/menu/menu.py | |
parent | 537b9cab037aecfd18edef156dd3ea55072918e9 (diff) |
-rw-r--r-- | archinstall/lib/menu/menu.py | 20 |
diff --git a/archinstall/lib/menu/menu.py b/archinstall/lib/menu/menu.py index 1d5d497e..d7b1605d 100644 --- a/archinstall/lib/menu/menu.py +++ b/archinstall/lib/menu/menu.py @@ -1,6 +1,7 @@ from typing import Dict, List, Union, Any, TYPE_CHECKING from archinstall.lib.menu.simple_menu import TerminalMenu + from ..exceptions import RequirementError from ..output import log @@ -22,7 +23,8 @@ class Menu(TerminalMenu): default_option :str = None, sort :bool = True, preset_values :Union[str, List[str]] = None, - cursor_index :int = None + cursor_index :int = None, + **kwargs ): """ Creates a new menu @@ -51,6 +53,8 @@ class Menu(TerminalMenu): :param cursor_index: The position where the cursor will be located. If it is not in range (number of elements of the menu) it goes to the first position :type cursor_index: int + + :param kwargs : any SimpleTerminal parameter """ # we guarantee the inmutability of the options outside the class. # an unknown number of iterables (.keys(),.values(),generator,...) can't be directly copied, in this case @@ -103,19 +107,23 @@ class Menu(TerminalMenu): cursor = "> " main_menu_cursor_style = ("fg_cyan", "bold") main_menu_style = ("bg_blue", "fg_gray") - + # defaults that can be changed up the stack + kwargs['clear_screen'] = kwargs.get('clear_screen',True) + kwargs['show_search_hint'] = kwargs.get('show_search_hint',True) + kwargs['cycle_cursor'] = kwargs.get('cycle_cursor',True) super().__init__( menu_entries=self.menu_options, title=menu_title, menu_cursor=cursor, menu_cursor_style=main_menu_cursor_style, menu_highlight_style=main_menu_style, - cycle_cursor=True, - clear_screen=True, + # cycle_cursor=True, + # clear_screen=True, multi_select=multi, - show_search_hint=True, + # show_search_hint=True, preselected_entries=self.preset_values, - cursor_index=self.cursor_index + cursor_index=self.cursor_index, + **kwargs, ) def _show(self): |