From 08d1b7748f2b400b3a092212f955ff0476d816e2 Mon Sep 17 00:00:00 2001 From: mfranz Date: Fri, 28 Jul 2006 10:11:34 +0000 Subject: [PATCH] draws tbi on top (vertically mirrored) --- src/Instrumentation/HUD/HUD.hxx | 1 + src/Instrumentation/HUD/HUD_tbi.cxx | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/Instrumentation/HUD/HUD.hxx b/src/Instrumentation/HUD/HUD.hxx index 0afc934fd..3c1baa3aa 100644 --- a/src/Instrumentation/HUD/HUD.hxx +++ b/src/Instrumentation/HUD/HUD.hxx @@ -530,6 +530,7 @@ public: private: void draw_scale(); void draw_tee(); + void draw_line(float, float, float, float); void draw_tick(float angle, float r1, float r2, int side); Input _bank; diff --git a/src/Instrumentation/HUD/HUD_tbi.cxx b/src/Instrumentation/HUD/HUD_tbi.cxx index dc8384e48..69cb70d5a 100644 --- a/src/Instrumentation/HUD/HUD_tbi.cxx +++ b/src/Instrumentation/HUD/HUD_tbi.cxx @@ -207,3 +207,13 @@ void HUD::TurnBankIndicator::draw_tick(float angle, float r1, float r2, int side } +void HUD::TurnBankIndicator::draw_line(float x1, float y1, float x2, float y2) +{ + if (option_top()) { + float y = 2.0 * _center_y; // mirror vertically + Item::draw_line(x1, y - y1, x2, y - y2); + } else + Item::draw_line(x1, y1, x2, y2); +} + + -- 2.39.5