eficonfig: add vertical scroll support
The current eficonfig menu does not support vertical scroll, so it can not display the menu entries greater than the console row size. This commit add the vertial scroll support. The console size is retrieved by SIMPLE_TEXT_OUTPUT_PROTOCOL.QueryMode() service, then calculates the row size for menu entry by subtracting menu header and description row size from the console row size. "start" and "end" are added in the efimenu structure. "start" keeps the menu entry index at the top, "end" keeps the bottom menu entry index. item_data_print() menu function only draws the menu entry between "start" and "end". This commit also fixes the issue that "Save" and "Quit" entries can be moved by BKEY_PLUS in change boot order menu. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
committed by
Heinrich Schuchardt
parent
0d59085235
commit
8dbd0a0f8e
@@ -49,6 +49,8 @@ struct eficonfig_entry {
|
||||
* @menu_header: menu header string
|
||||
* @menu_desc: menu description string
|
||||
* @list: menu entry list structure
|
||||
* @start: top menu index to draw
|
||||
* @end: bottom menu index to draw
|
||||
*/
|
||||
struct efimenu {
|
||||
int delay;
|
||||
@@ -57,6 +59,8 @@ struct efimenu {
|
||||
char *menu_header;
|
||||
const char *menu_desc;
|
||||
struct list_head list;
|
||||
int start;
|
||||
int end;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user