-static FGPanelInstrument *
-createNAV1 (int x, int y)
-{
- FGLayeredInstrument * inst = new FGLayeredInstrument(x, y, SIX_W, SIX_W);
-
- // Action: increase selected radial
- inst->addAction(SIX_W/2 - SIX_W/5, -SIX_W/2, SIX_W/10, SIX_W/5,
- new FGAdjustAction(FGBFI::getNAV1SelRadial,
- FGBFI::setNAV1SelRadial,
- 1.0, 0.0, 360.0, true));
-
- // Action: decrease selected radial
- inst->addAction(SIX_W/2 - SIX_W/10, -SIX_W/2, SIX_W/10, SIX_W/5,
- new FGAdjustAction(FGBFI::getNAV1SelRadial,
- FGBFI::setNAV1SelRadial,
- -1.0, 0.0, 360.0, true));
-
- // Layer 0: background
- inst->addLayer(0, createTexture("Textures/Panel/gyro-bg.rgb"));
- inst->addTransformation(0, FGInstrumentLayer::ROTATION,
- FGBFI::getNAV1SelRadial,
- -360.0, 360.0, -1.0, 0.0);
-
- // Layer 1: left-right needle.
- inst->addLayer(1, createTexture("Textures/Panel/nav-needle.rgb"));
- inst->addTransformation(1, FGInstrumentLayer::XSHIFT,
- FGSteam::get_HackVOR1_deg,
- -10.0, 10.0, SIX_W / 40.0, 0.0);
-
- // Layer 2: glidescope needle
- inst->addLayer(2, createTexture("Textures/Panel/nav-needle.rgb"));
- inst->addTransformation(2, FGInstrumentLayer::YSHIFT,
- FGSteam::get_HackGS_deg,
- -1.0, 1.0, SIX_W / 5.0, 0.0);
- inst->addTransformation(2, FGInstrumentLayer::ROTATION,
- 90 );
-
- // Layer 3: face with markings
- inst->addLayer(3, createTexture("Textures/Panel/nav-face.rgb"));
-
- // Layer 4: heading knob
- // rotates with selected radial
- inst->addLayer(4, createTexture("Textures/Panel/heading-knob.rgb"));
- inst->addTransformation(4, FGInstrumentLayer::XSHIFT, SIX_W/2 - 10);
- inst->addTransformation(4, FGInstrumentLayer::YSHIFT, -SIX_W/2 + 10);
- inst->addTransformation(4, FGInstrumentLayer::ROTATION,
- FGBFI::getNAV1SelRadial,
- -360.0, 360.0, -1.0, 0.0);
-
- return inst;