initialize HUD class and call its drawing routine from renderer
(basically a NOOP if /sim/hud/visibility[1] is false)
This commit is contained in:
parent
0beba6c967
commit
e46036d55f
2 changed files with 9 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
|||
#include <Main/fg_props.hxx>
|
||||
#include <Main/globals.hxx>
|
||||
#include <Main/util.hxx>
|
||||
#include <Instrumentation/HUD/HUD.hxx>
|
||||
|
||||
#include "instrument_mgr.hxx"
|
||||
#include "adf.hxx"
|
||||
|
@ -44,7 +45,7 @@
|
|||
#include "inst_vertical_speed_indicator.hxx" // (TJ)
|
||||
#include "od_gauge.hxx"
|
||||
#include "wxradar.hxx"
|
||||
#include "tacan.hxx"
|
||||
#include "tacan.hxx"
|
||||
#include "mk_viii.hxx"
|
||||
|
||||
|
||||
|
@ -52,6 +53,7 @@ FGInstrumentMgr::FGInstrumentMgr ()
|
|||
{
|
||||
set_subsystem("annunciator", new Annunciator);
|
||||
set_subsystem("od_gauge", new FGODGauge, 1.0);
|
||||
set_subsystem("hud", new HUD);
|
||||
|
||||
config_props = new SGPropertyNode;
|
||||
|
||||
|
|
|
@ -68,6 +68,8 @@
|
|||
#include <Scenery/tilemgr.hxx>
|
||||
#include <ATC/ATCdisplay.hxx>
|
||||
#include <GUI/new_gui.hxx>
|
||||
#include <Instrumentation/instrument_mgr.hxx>
|
||||
#include <Instrumentation/HUD/HUD.hxx>
|
||||
|
||||
#include "splash.hxx"
|
||||
#include "renderer.hxx"
|
||||
|
@ -729,6 +731,10 @@ FGRenderer::update( bool refresh_camera_settings ) {
|
|||
hud_and_panel->apply();
|
||||
fgCockpitUpdate();
|
||||
|
||||
FGInstrumentMgr *instr = static_cast<FGInstrumentMgr *>(globals->get_subsystem("instrumentation"));
|
||||
HUD *hud = static_cast<HUD *>(instr->get_subsystem("hud"));
|
||||
hud->draw();
|
||||
|
||||
// Use the hud_and_panel ssgSimpleState for rendering the ATC output
|
||||
// This only works properly if called before the panel call
|
||||
if((fgGetBool("/sim/atc/enabled")) || (fgGetBool("/sim/ai-traffic/enabled")))
|
||||
|
|
Loading…
Reference in a new issue