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: BSP_DISCO_F746NG F746_GUI LCD_DISCO_F746NG SDFileSystem TS_DISCO_F746NG ResistiveTouchController Map CYS8218Controller MedianFilter
MainMenuScreen.cpp
00001 #include "MainMenuScreen.hpp" 00002 00003 MainMenuScreen::MainMenuScreen(int *nextScreen) : 00004 Screen(), 00005 _lbTitle( SCREEN_W/2, 0, "Main Menu", Label::CENTER, Font24), 00006 _btAutomatic( 0, 27,((SCREEN_W)/2)-5, SCREEN_H-67, "Automatic", Font20), 00007 _btManual( (SCREEN_W/2)+5, 27, (SCREEN_W/2)-5, SCREEN_H-67, "Manual", Font20), 00008 _btSettings( 0, SCREEN_H-30, SCREEN_W,30, "Settings", Font20) 00009 { 00010 _nextScreen = nextScreen; 00011 } 00012 00013 void MainMenuScreen::Draw() 00014 { 00015 Clear(); 00016 _lbTitle.Draw(); 00017 _btAutomatic.Draw(); 00018 _btManual.Draw(); 00019 _btSettings.Draw(); 00020 } 00021 00022 void MainMenuScreen::Process() 00023 { 00024 if( _btSettings.Touched() ) 00025 *_nextScreen = MAIN_SETTINGS_SCREEN; 00026 00027 if( _btManual.Touched() ) 00028 *_nextScreen = MANUAL_CONTROL_SCREEN; 00029 00030 if( _btAutomatic.Touched() ) 00031 *_nextScreen = AUTOMATIC_CONTROL_SCREEN; 00032 00033 }
Generated on Wed Jul 13 2022 02:28:05 by
1.7.2