]> git.mxchange.org Git - flightgear.git/commitdiff
Allow the DIR page to be exited properly using the inner knob
authordaveluff <daveluff>
Tue, 3 Nov 2009 22:55:36 +0000 (22:55 +0000)
committerTim Moore <timoore@redhat.com>
Wed, 4 Nov 2009 22:15:48 +0000 (23:15 +0100)
src/Instrumentation/KLN89/kln89_page_dir.cxx
src/Instrumentation/KLN89/kln89_page_dir.hxx

index de761232a475abf60c64ab871bc1017201459948..c80bd2397041983be0b329ca606e4e8de758c61c 100644 (file)
@@ -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();
+       }
+}
index d9f66b6912964c647b0b9aed9a5da10df7deaaba..fe8f18261cb4e5b0ec4f85e5bc081db0f5c653b3 100644 (file)
@@ -38,6 +38,8 @@ public:
        
        void ClrPressed();
        void EntPressed();
+       void Knob2Left1();
+       void Knob2Right1();
        
 private:
        // Waypoint display mode.