Skip to content
Snippets Groups Projects
Commit f0c06c07 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'dd_lightbar_menu_scroll_home_fix' into 'master'

DD lightbar menu fix for navigating with the HOME key with the top item index > 0 & selected item is in the middle of the screen

See merge request !239
parents 650abd10 7a8f1d02
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!239DD lightbar menu fix for navigating with the HOME key with the top item index > 0 & selected item is in the middle of the screen
......@@ -1725,12 +1725,13 @@ function DDLightbarMenu_GetVal(pDraw, pSelectedItemIndexes)
if (this.selectedItemIdx > 0)
{
var oldSelectedItemIdx = this.selectedItemIdx;
this.oldTopItemIdx = this.topItemIdx;
// If the current item index is not on first current page, then scroll.
// Otherwise, draw more efficiently by drawing the current item in
// regular colors and the first item in highlighted colors.
this.topItemIdx = 0;
var numItemsPerPage = this.GetNumItemsPerPage();
if (this.selectedItemIdx >= 0 + numItemsPerPage)
if (this.oldTopItemIdx > 0)
{
this.selectedItemIdx = 0;
this.Draw(pSelectedItemIndexes, false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment