@@ -88,7 +88,16 @@ void Field_Draw( menufield_s *f )
88
88
char tempbuffer [128 ]= "" ;
89
89
90
90
if ( f -> generic .name )
91
- Menu_DrawStringR2LDark ( f -> generic .x + f -> generic .parent -> x + LCOLUMN_OFFSET , f -> generic .y + f -> generic .parent -> y , f -> generic .name );
91
+ {
92
+ if ( f -> generic .flags & QMF_INACTIVE )
93
+ {
94
+ Menu_DrawStringR2L ( f -> generic .x + f -> generic .parent -> x + LCOLUMN_OFFSET , f -> generic .y + f -> generic .parent -> y , f -> generic .name );
95
+ }
96
+ else
97
+ {
98
+ Menu_DrawStringR2LDark ( f -> generic .x + f -> generic .parent -> x + LCOLUMN_OFFSET , f -> generic .y + f -> generic .parent -> y , f -> generic .name );
99
+ }
100
+ }
92
101
93
102
strncpy ( tempbuffer , f -> buffer + f -> visible_offset , f -> visible_length );
94
103
@@ -298,7 +307,7 @@ void Menu_AdjustCursor( menuframework_s *m, int dir )
298
307
{
299
308
if ( ( citem = Menu_ItemAtCursor ( m ) ) != 0 )
300
309
{
301
- if ( citem -> type != MTYPE_SEPARATOR )
310
+ if ( citem -> type != MTYPE_SEPARATOR && !( citem -> flags & QMF_INACTIVE ) )
302
311
return ;
303
312
}
304
313
}
@@ -313,7 +322,7 @@ void Menu_AdjustCursor( menuframework_s *m, int dir )
313
322
{
314
323
citem = Menu_ItemAtCursor ( m );
315
324
if ( citem )
316
- if ( citem -> type != MTYPE_SEPARATOR )
325
+ if ( citem -> type != MTYPE_SEPARATOR && !( citem -> flags & QMF_INACTIVE ) )
317
326
break ;
318
327
m -> cursor += dir ;
319
328
if ( m -> cursor >= m -> nitems )
@@ -326,7 +335,7 @@ void Menu_AdjustCursor( menuframework_s *m, int dir )
326
335
{
327
336
citem = Menu_ItemAtCursor ( m );
328
337
if ( citem )
329
- if ( citem -> type != MTYPE_SEPARATOR )
338
+ if ( citem -> type != MTYPE_SEPARATOR && !( citem -> flags & QMF_INACTIVE ) )
330
339
break ;
331
340
m -> cursor += dir ;
332
341
if ( m -> cursor < 0 )
@@ -572,7 +581,14 @@ void MenuList_Draw( menulist_s *l )
572
581
const char * * n ;
573
582
int y = 0 ;
574
583
575
- Menu_DrawStringR2LDark ( l -> generic .x + l -> generic .parent -> x + LCOLUMN_OFFSET , l -> generic .y + l -> generic .parent -> y , l -> generic .name );
584
+ if ( l -> generic .flags & QMF_INACTIVE )
585
+ {
586
+ Menu_DrawStringR2L ( l -> generic .x + l -> generic .parent -> x + LCOLUMN_OFFSET , l -> generic .y + l -> generic .parent -> y , l -> generic .name );
587
+ }
588
+ else
589
+ {
590
+ Menu_DrawStringR2LDark ( l -> generic .x + l -> generic .parent -> x + LCOLUMN_OFFSET , l -> generic .y + l -> generic .parent -> y , l -> generic .name );
591
+ }
576
592
577
593
n = l -> itemnames ;
578
594
@@ -611,9 +627,18 @@ void Slider_Draw( menuslider_s *s )
611
627
{
612
628
int i ;
613
629
614
- Menu_DrawStringR2LDark ( s -> generic .x + s -> generic .parent -> x + LCOLUMN_OFFSET ,
615
- s -> generic .y + s -> generic .parent -> y ,
616
- s -> generic .name );
630
+ if ( s -> generic .flags & QMF_INACTIVE )
631
+ {
632
+ Menu_DrawStringR2L ( s -> generic .x + s -> generic .parent -> x + LCOLUMN_OFFSET ,
633
+ s -> generic .y + s -> generic .parent -> y ,
634
+ s -> generic .name );
635
+ }
636
+ else
637
+ {
638
+ Menu_DrawStringR2LDark ( s -> generic .x + s -> generic .parent -> x + LCOLUMN_OFFSET ,
639
+ s -> generic .y + s -> generic .parent -> y ,
640
+ s -> generic .name );
641
+ }
617
642
618
643
s -> range = ( s -> curvalue - s -> minvalue ) / ( float ) ( s -> maxvalue - s -> minvalue );
619
644
@@ -625,7 +650,8 @@ void Slider_Draw( menuslider_s *s )
625
650
for ( i = 0 ; i < SLIDER_RANGE ; i ++ )
626
651
Draw_Char ( RCOLUMN_OFFSET + s -> generic .x + i * 8 + s -> generic .parent -> x + 8 , s -> generic .y + s -> generic .parent -> y , 129 );
627
652
Draw_Char ( RCOLUMN_OFFSET + s -> generic .x + i * 8 + s -> generic .parent -> x + 8 , s -> generic .y + s -> generic .parent -> y , 130 );
628
- Draw_Char ( ( int ) ( 8 + RCOLUMN_OFFSET + s -> generic .parent -> x + s -> generic .x + (SLIDER_RANGE - 1 )* 8 * s -> range ), s -> generic .y + s -> generic .parent -> y , 131 );
653
+ if ( !( s -> generic .flags & QMF_INACTIVE ) )
654
+ Draw_Char ( ( int ) ( 8 + RCOLUMN_OFFSET + s -> generic .parent -> x + s -> generic .x + (SLIDER_RANGE - 1 )* 8 * s -> range ), s -> generic .y + s -> generic .parent -> y , 131 );
629
655
}
630
656
631
657
void SpinControl_DoEnter ( menulist_s * s )
@@ -657,9 +683,18 @@ void SpinControl_Draw( menulist_s *s )
657
683
658
684
if ( s -> generic .name )
659
685
{
660
- Menu_DrawStringR2LDark ( s -> generic .x + s -> generic .parent -> x + LCOLUMN_OFFSET ,
661
- s -> generic .y + s -> generic .parent -> y ,
662
- s -> generic .name );
686
+ if ( s -> generic .flags & QMF_INACTIVE )
687
+ {
688
+ Menu_DrawStringR2L ( s -> generic .x + s -> generic .parent -> x + LCOLUMN_OFFSET ,
689
+ s -> generic .y + s -> generic .parent -> y ,
690
+ s -> generic .name );
691
+ }
692
+ else
693
+ {
694
+ Menu_DrawStringR2LDark ( s -> generic .x + s -> generic .parent -> x + LCOLUMN_OFFSET ,
695
+ s -> generic .y + s -> generic .parent -> y ,
696
+ s -> generic .name );
697
+ }
663
698
}
664
699
if ( !strchr ( s -> itemnames [s -> curvalue ], '\n' ) )
665
700
{
0 commit comments