comparison Discovery/Src/tMenu.c @ 169:842f57bbaaad cleanup-1

Bugfix: highlight the menu underline correctly on selected state This fixes an optical bug. In dive and simulation mode, the underline in the top menu was not highlighted correctly for the DECO ans SYS submenu's. The check when to highlight simply was not correct. And, yes, this part of the code is rather obfuscated, and deserves some attention later on. Reported-by: Matthias Heinrichs <matthias.heinrichs@heinrichsweikamp.com> Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Sun, 10 Mar 2019 10:09:58 +0100
parents 5e41365ff0d8
children 2bb1db22b5f5
comparison
equal deleted inserted replaced
167:5e41365ff0d8 169:842f57bbaaad
298 GFX_SetFrameTop(tMscreen.FBStartAdress); 298 GFX_SetFrameTop(tMscreen.FBStartAdress);
299 releaseFrame(5,rememberPage); 299 releaseFrame(5,rememberPage);
300 } 300 }
301 301
302 302
303 void tM_create_pagenumbering(void) 303 static void tM_create_pagenumbering(void)
304 { 304 {
305 menu.pageCountTotal = 0; 305 menu.pageCountTotal = 0;
306 306
307 for(int i=0;i<=MAXPAGES;i++) 307 for(int i=0;i<=MAXPAGES;i++)
308 { 308 {
1196 k4text = k; // new hw 170522 1196 k4text = k; // new hw 170522
1197 if((text8max[k][0] == 0) && (menu.pageCountNumber[k-1] == 0)) 1197 if((text8max[k][0] == 0) && (menu.pageCountNumber[k-1] == 0))
1198 k4text = k-1; 1198 k4text = k-1;
1199 1199
1200 color_top.al8[0] = CLUT_MenuPageGasOC + k - 1; 1200 color_top.al8[0] = CLUT_MenuPageGasOC + k - 1;
1201 if(k4text == page) 1201 if (k == page)
1202 { 1202 {
1203 color_top.al8[1] = 0xFF; 1203 color_top.al8[1] = 0xFF;
1204 } 1204 }
1205 else 1205 else
1206 { 1206 {