mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-02 06:03:54 +00:00
poppy: center detachable menu text
BUG=b:35585623 BRANCH=None TEST=reboot and make sure menu is centered in fw screen CQ-DEPEND=CL:447818 Change-Id: I7ce5063adab978338af18ad2befe65107fdea21f Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/447838 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
@@ -332,12 +332,16 @@ VbError_t vb2_print_current_menu()
|
||||
static char **m = NULL;
|
||||
int highlight = 0;
|
||||
// TODO: We probably want to center this text.
|
||||
int xindex = 50;
|
||||
int yindex = 30;
|
||||
uint32_t xindex, yindex;
|
||||
|
||||
// TODO: need to check for error code.
|
||||
vb2_get_current_menu_size(current_menu, &m, &size);
|
||||
|
||||
/* Center block of text */
|
||||
VbExDisplayGetDimension(&xindex, &yindex);
|
||||
xindex = xindex/2 - strlen(m[0])/2;
|
||||
yindex = yindex/2 - size/2;
|
||||
|
||||
// TODO: do clear screen here.
|
||||
/* Create menu string */
|
||||
for (i = 0; i < size; i++) {
|
||||
|
||||
Reference in New Issue
Block a user