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.
Diff: Options_Engine/OptionsEngine.cpp
- Revision:
- 25:b52aa23df120
- Parent:
- 24:c6415cc74b17
- Child:
- 26:0dc10374546f
--- a/Options_Engine/OptionsEngine.cpp Fri Apr 19 11:16:19 2019 +0000 +++ b/Options_Engine/OptionsEngine.cpp Sun Apr 21 13:20:12 2019 +0000 @@ -9,22 +9,7 @@ void OptionsEngine::init(){ _state = BRIGHTNESS; _brightness = 0.5; - _ball_speed = 0.5; - -} - -void OptionsEngine::options_menu(Gamepad &gamepad, N5110 &lcd, Ball &ball, SDFileSystem &sd){ - Option choice = BRIGHTNESS; - while(!(gamepad.check_event(gamepad.A_PRESSED))){ - lcd.clear(); - display_options(lcd); - choice = option_selection(gamepad, lcd); - lcd.refresh(); - wait(0.2); - } - if(choice == BRIGHTNESS){ change_brightness(gamepad, lcd); } - if(choice == BALL_SPEED){ change_ball_speed(gamepad, lcd, ball); } - if(choice == HIGH_SCORES){ view_high_scores(gamepad, lcd, sd); } + _ball_speed = 0.5; } void OptionsEngine::display_options(N5110 &lcd){