Closed Maker42 closed 5 years ago
Fixes Issue #41
To use disappearing menus, add to the pyEfis yaml, under the section:
menu:
show_time:
The default behavior if each button, if the menu is hidden, is to simply make the menu appear again. To over-ride the behavior, add one or two booleans to the menu entry definition. The first boolean is called "show_menu". If set to true, it will cause the menu to be displayed again if hidden. The second boolean is "perform_blind". If set to True, the menu action is performed even if the menu was previously hidden.
show_menu | perform_blind | State of Menu | Action
-----------|------------------|---------------|------------------------
True | False | Showing | Menu action performed.
True | False | Hidden | Menu re-appears.
True | True | Showing | Menu action performed.
True | True | Hidden | Menu re-appears. Menu action performed.
False | True | Showing | Menu action performed.
False | True | Hidden | Menu Stays hidden. Menu action performed.
False | False | Showing | Menu action performed.
False | False | Hidden | Button ignored.
Example where show_menu and perform_blind are both set True:
menus:
PFDMenu:
- ['Baro', 'set menu focus', BARO, True, True] # Add optional flags after 'args' for a menu entry