From 24b8156e9f724df674a2526009ef9df87147eb78 Mon Sep 17 00:00:00 2001 From: mfranz Date: Tue, 1 May 2007 19:36:41 +0000 Subject: [PATCH] HUD: only consider i/I/H presses when a HUD is displayed --- Nasal/aircraft.nas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Nasal/aircraft.nas b/Nasal/aircraft.nas index 3da9ba1b9..e1a566081 100644 --- a/Nasal/aircraft.nas +++ b/Nasal/aircraft.nas @@ -542,16 +542,19 @@ HUDControl = { } }, cycle_brightness : func { # H-key + me.is_active() or return; var br = me.brightnessN.getValue() - 0.2; me.brightnessN.setValue(br > 0.01 ? br : 1); }, normal_type : func { # i-key + me.is_active() or return; me.oldinit1(); me.vis0N.setBoolValue(1); me.vis1N.setBoolValue(0); me.currentN = me.vis0N; }, cycle_type : func { # I-key + me.is_active() or return; if (me.currentN == me.vis0N) { me.vis0N.setBoolValue(0); me.vis1N.setBoolValue(1); @@ -565,6 +568,7 @@ HUDControl = { }, oldinit1 : func { fgcommand("hud-init", props.Node.new()) }, oldinit2 : func { fgcommand("hud-init2", props.Node.new()) }, + is_active : func { me.vis0N.getValue() or me.vis1N.getValue() }, };