Skip to content

Commit

Permalink
Fix for current menu item position on menu page change #2
Browse files Browse the repository at this point in the history
  • Loading branch information
sp9bsl committed Feb 15, 2018
1 parent 6a506b7 commit 8cd2f80
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mchf-eclipse/drivers/ui/menu/ui_menu_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ void UiMenu_RenderMenu(uint16_t mode)
{
UiMenu_UpdateMenuEntry(menu[idx].entryItem,mode, idx);
}
UiMenu_MoveCursor(ts.menu_item%ts.Layout->MENUSIZE); //redraw of cursor
}
break;

Expand Down Expand Up @@ -746,14 +747,12 @@ void UiMenu_RenderLastScreen()
UiMenu_DisplayMoveSlotsForward(ts.Layout->MENUSIZE);
}
UiMenu_RenderMenu(MENU_RENDER_ONLY);
UiMenu_MoveCursor(ts.menu_item%ts.Layout->MENUSIZE); //Update menu item to show the current line marker
}

void UiMenu_RenderFirstScreen()
{
init_done = false;
UiMenu_RenderMenu(MENU_RENDER_ONLY);
UiMenu_MoveCursor(ts.menu_item%ts.Layout->MENUSIZE); //Update menu item to show the current line marker
}

bool UiMenu_RenderNextScreen()
Expand All @@ -762,7 +761,6 @@ bool UiMenu_RenderNextScreen()
if (retval)
{
UiMenu_RenderMenu(MENU_RENDER_ONLY);
UiMenu_MoveCursor(ts.menu_item%ts.Layout->MENUSIZE); //Update menu item to show the current line marker
}
return retval;
}
Expand All @@ -773,8 +771,6 @@ bool UiMenu_RenderPrevScreen()
if (retval)
{
UiMenu_RenderMenu(MENU_RENDER_ONLY);
UiMenu_MoveCursor(ts.menu_item%ts.Layout->MENUSIZE); //Update menu item to show the current line marker

}
return retval;
}

0 comments on commit 8cd2f80

Please sign in to comment.