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: lib/Controls/Controls.h
- Revision:
- 26:fa78fa1b2a60
- Parent:
- 23:ecb74e52163d
--- a/lib/Controls/Controls.h Thu May 09 00:36:51 2019 +0000
+++ b/lib/Controls/Controls.h Thu May 09 00:42:18 2019 +0000
@@ -6,7 +6,7 @@
#include "Gamepad.h"
/** Controls Class
-*@brief This class is for the controls menu screen.
+*@brief This class is for the controls menu screen
*@author Kern Fowler
*@version 1.0
*@date May 2019
@@ -16,7 +16,7 @@
public:
/** Controls Constructor
-@brief Builds my default Controls constructor.
+@brief Builds my default Controls contructor.
@details This does not have any setup.
*/
Controls();
@@ -32,6 +32,22 @@
*@param pad The Gamepad class is used.
*@param lcd The N5110 class is used.
*@details Prints various text to screen relating to the game controls.
+*@code
+void Controls::controls_run(Gamepad &pad, N5110 &lcd) {
+ wait_ms(250);
+ while (pad.check_event(Gamepad::BACK_PRESSED) == false) { // Continues to show this screen until BACK button pressed.
+ //printf("Control State");
+ lcd.clear();
+ lcd.printString("Controls",19,0);
+ lcd.printString("Move Joystick ",0,2);
+ lcd.printString("Left or Right ",0,3);
+ lcd.printString(" to move ",0,4);
+ lcd.printString(" Donkey Kong ",0,5);
+ lcd.refresh();
+ wait_ms(1.0f/24);
+ }
+}
+@endcode
*/
void controls_run(Gamepad &pad, N5110 &lcd);
};