Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FatFileSystem mbed
Diff: UIMenu.cpp
- Revision:
- 1:d1da77023e6a
- Parent:
- 0:6da5625a6946
- Child:
- 3:0ac64c4ca40f
diff -r 6da5625a6946 -r d1da77023e6a UIMenu.cpp
--- a/UIMenu.cpp Thu Dec 29 01:59:53 2011 +0000
+++ b/UIMenu.cpp Sun Jan 15 09:07:04 2012 +0000
@@ -37,7 +37,7 @@
}
}
-void PushKnobUI::SwitchTo( PushKnobUI * other )
+void PushKnobUI::SwitchControl( PushKnobUI * other )
{
other->ConnectDevices( fKnob, fKnobButton );
fKnob = NULL;
@@ -128,6 +128,13 @@
Wake();
printf("Selected %s\n\r", fLabels[fSelectedItem].c_str() );
}
+
+void UIMenu::SwitchTo( UIMenu * nextMenu )
+{
+ Display( false );
+ SwitchControl( nextMenu );
+ nextMenu->Display( true );
+}
// Parameters controlling the display layout
const int kLineSpace = 20;
@@ -157,6 +164,7 @@
if (on)
{
fDisplayOn = true;
+ fLCD->clear( BLACK, 0, 0, 131, kLineSpace + kTopGap );
fLCD->clear( GRAY, 0, kLineSpace + kTopGap-1, 131, kLineSpace + kTopGap );
if (! fHeader.empty())
fLCD->draw_glyph_text( WHITE, BLACK, 2, kLineSpace-2, fHeader.c_str() );