@@ -425,6 +425,43 @@ const uint16_t icons[55][5] = {
425425 }
426426 }
427427
428+
429+ void hud_bar (int x , int y , int percent , bool active ) {
430+ int w , h ;
431+
432+ int i = 0 ;
433+ for (h = 0 ; h < 7 ; h ++ ) {
434+ for (w = 0 ; w < 100 ; w ++ ) {
435+ buffer [i ] = (w + h )%2 == 0 ? GUI .fg : GUI .bg ;
436+ i ++ ;
437+ }
438+ }
439+ ili9341_write_frame_rectangleLE (x , y , 100 , 7 , buffer );
440+
441+ i = 0 ;
442+ for (h = 0 ; h < 7 ; h ++ ) {
443+ for (w = 0 ; w < percent ; w ++ ) {
444+ buffer [i ] = active ? GUI .hl : GUI .fg ;
445+ i ++ ;
446+ }
447+ }
448+ ili9341_write_frame_rectangleLE (x , y , percent , 7 , buffer );
449+ }
450+
451+ void hud_volume () {
452+ // y=176;
453+ int LIMIT = OPTIONS - 3 ;
454+ bool active = OPTION == LIMIT ? true : false;
455+ hud_bar ((SCREEN .w - 120 ), 176 , 50 , active );
456+ }
457+
458+ void hud_brightness () {
459+ // y=176;
460+ int LIMIT = OPTIONS - 2 ;
461+ bool active = OPTION == LIMIT ? true : false;
462+ hud_bar ((SCREEN .w - 120 ), 196 , 25 , active );
463+ }
464+
428465 void hud_options () {
429466 x = 16 ;
430467 y = 28 ;
@@ -475,6 +512,9 @@ const uint16_t icons[55][5] = {
475512 STATE = EXTRAS [OPTION - LIMIT ];
476513 }
477514 printf ("\n**********\n%s - %d:%d\n**********\n" , STATE .label , OPTION , LIMIT );
515+
516+ hud_volume ();
517+ hud_brightness ();
478518 }
479519//}#pragma endregion Display
480520
0 commit comments