}
}
}
-
// Key released.
else {
SG_LOG(SG_INPUT, SG_DEBUG, "User released key " << k
return;
}
}
- }
- // Use the old, default actions.
- SG_LOG( SG_INPUT, SG_DEBUG, "(No user binding.)" );
-
- if (modifiers & KEYMOD_RELEASED)
- return;
-
- // Hard-coded legacy key handlers.
- // These need to be turned into FGCommand bindings and mapped via
- // the input configuration...
- switch (k) {
- case 'H':
- HUD_brightkey( true );
- break;
- case 'h':
- HUD_masterswitch( true );
- break;
- case 'I':
- fgHUDInit2(¤t_aircraft); // Minimal Hud
- break;
- case 'i':
- fgHUDInit(¤t_aircraft); // normal HUD
- break;
}
}
#include <Cockpit/panel.hxx>
#include <Cockpit/panel_io.hxx>
+#include <Cockpit/hud.hxx>
#include <Environment/environment.hxx>
#include <FDM/flight.hxx>
#include <GUI/gui.h>
return true;
}
+static bool
+do_hud_brightkey(const SGPropertyNode *)
+{
+ HUD_brightkey( true );
+ return true;
+}
+
+static bool
+do_hud_masterswitch(const SGPropertyNode *)
+{
+ HUD_masterswitch( true );
+ return true;
+}
+
+static bool
+do_hud_init(const SGPropertyNode *)
+{
+ fgHUDInit(0); // minimal HUD
+ return true;
+}
+
+static bool
+do_hud_init2(const SGPropertyNode *)
+{
+ fgHUDInit2(0); // normal HUD
+ return true;
+}
////////////////////////////////////////////////////////////////////////
// Command setup.
{ "replay", do_replay },
{ "decrease-visibility", do_decrease_visibility },
{ "increase-visibility", do_increase_visibility },
+ { "hud-brightkey", do_hud_brightkey },
+ { "hud-masterswitch", do_hud_masterswitch },
+ { "hud-init", do_hud_init },
+ { "hud-init2", do_hud_init2 },
{ 0, 0 } // zero-terminated
};