From: daveluff Date: Tue, 3 Nov 2009 22:55:36 +0000 (+0000) Subject: Allow the DIR page to be exited properly using the inner knob X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=24b57ada097653135f43e1d388bc05b8d08a7a6e;p=flightgear.git Allow the DIR page to be exited properly using the inner knob --- diff --git a/src/Instrumentation/KLN89/kln89_page_dir.cxx b/src/Instrumentation/KLN89/kln89_page_dir.cxx index de761232a..c80bd2397 100644 --- a/src/Instrumentation/KLN89/kln89_page_dir.cxx +++ b/src/Instrumentation/KLN89/kln89_page_dir.cxx @@ -105,3 +105,37 @@ void KLN89DirPage::EntPressed() { _kln89->DtoInitiate(_id); } } + +void KLN89DirPage::Knob2Left1() { + if(_kln89->_mode == KLN89_MODE_CRSR) { + if(_DToWpDispMode == 0) { + _DToWpDispMode = 1; + } else if(_DToWpDispMode == 1) { + // TODO + } else { + // TODO + } + } else { + // If the cursor is not displayed, then we return to the page that was displayed prior to DTO being pressed, + // and pass the knob turn to that page, whether pulled out or not. + _kln89->_activePage = _kln89->_pages[_kln89->_curPage]; + _kln89->_activePage->Knob2Left1(); + } +} + +void KLN89DirPage::Knob2Right1() { + if(_kln89->_mode == KLN89_MODE_CRSR) { + if(_DToWpDispMode == 0) { + _DToWpDispMode = 1; + } else if(_DToWpDispMode == 1) { + // TODO + } else { + // TODO + } + } else { + // If the cursor is not displayed, then we return to the page that was displayed prior to DTO being pressed, + // and pass the knob turn to that page, whether pulled out or not. + _kln89->_activePage = _kln89->_pages[_kln89->_curPage]; + _kln89->_activePage->Knob2Right1(); + } +} diff --git a/src/Instrumentation/KLN89/kln89_page_dir.hxx b/src/Instrumentation/KLN89/kln89_page_dir.hxx index d9f66b691..fe8f18261 100644 --- a/src/Instrumentation/KLN89/kln89_page_dir.hxx +++ b/src/Instrumentation/KLN89/kln89_page_dir.hxx @@ -38,6 +38,8 @@ public: void ClrPressed(); void EntPressed(); + void Knob2Left1(); + void Knob2Right1(); private: // Waypoint display mode.