Showing 1 changed files with 10 additions and 4 deletions
+10 -4
Nasal/display.nas
... ...
@@ -471,7 +471,7 @@ var displayClass = {
471 471
     },
472 472
 #}}}
473 473
 
474
-    setSoftKeyColor : func (n, active, alert = 0) {
474
+    setSoftKeyColor : func (n, active, implemented, alert = 0) {
475 475
 # set colors for active softkeys {{{
476 476
         var sftk = sprintf('SoftKey%02i-', n);
477 477
         if (active) {
... ...
@@ -482,10 +482,11 @@ var displayClass = {
482 482
                 .setColor(0,0,0);
483 483
         }
484 484
         else {
485
+            var tc = implemented ? 1 : 0.5;
485 486
             me.screenElements[sftk ~ 'bg']
486 487
                 .setColorFill(0,0,0);
487 488
             me.screenElements[sftk ~ 'text']
488
-                .setColor(1,1,1);
489
+                .setColor(tc,tc,tc);
489 490
         }
490 491
     },
491 492
 #}}}
... ...
@@ -561,14 +562,18 @@ var displayClass = {
561 562
                 .setText('ALERTS');
562 563
             if (size(me.device.softkeys.path) != 0)
563 564
                 me.screenElements[sprintf("SoftKey%02i-text", 10)]
564
-                    .setText('BACK');
565
+                    .setText('BACK')
566
+                    .setColor(1,1,1);
565 567
         }
566 568
 
567 569
         var path = keyMap[me.device.role];
570
+        var bindings = me.device.softkeys.bindings[me.device.role];
568 571
         var pathid = '';
569 572
         foreach (var p; me.device.softkeys.path) {
570 573
             path = path[p];
571 574
             pathid ~= p;
575
+            if (contains(bindings, p))
576
+                bindings = bindings[p];
572 577
         }
573 578
 
574 579
         # feeding with empty menus the first boxes
... ...
@@ -586,7 +591,8 @@ var displayClass = {
586 591
             me.screenElements[sprintf("SoftKey%02i-text", i)]
587 592
                 .setText(path.texts[k]);
588 593
             me.setSoftKeyColor(i,
589
-                    contains(me.device.softkeys.colored, pathid ~ path.texts[k]));
594
+                    contains(me.device.softkeys.colored, pathid ~ path.texts[k]),
595
+                    contains(bindings, path.texts[k]));
590 596
         }
591 597
         # feeding the last boxes with empty string
592 598
         var end = (me.device.role == 'PFD') ? 10 : 12;