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: mbed
UserInteraction/UX.h
- Committer:
- shahidsajid
- Date:
- 2019-04-30
- Revision:
- 21:a0904159e183
- Parent:
- Bat/Bat.h@ 20:9d21599fe350
- Child:
- 22:69d7fe739872
File content as of revision 21:a0904159e183:
#ifndef UX_H
#define UX_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
/** Ball Class
@author Dr Craig A. Evans, University of Leeds
@brief Controls the ball in the Pong game
@date Febraury 2017
*/
class UX
{
public:
UX();
~UX();
void init();
void draw(N5110 &lcd);
void update();
int get_a_pressed();
int get_l_pressed();
void reset();
int get_loft_ball();
void first_menu(N5110 &menu_lcd,Gamepad &pad);
void second_menu(N5110 &menu_lcd);
void menu_options(N5110 &menu_lcd);
void rules_menu(N5110 &menu_lcd);
void controls_menu(N5110 &menu_lcd);
void game_over(string message);
void game_over_menu(N5110 &menu_lcd,int option);
void victory_menu(N5110 &menu_lcd);
void info_screen(N5110 &menu_lcd, int target);
/// accessors and mutators
private:
Gamepad batPad;
int _hitBall;
int _loft_ball;
int d;
Direction _d;
int _size;
int _x;
int _y;
bool _button_pressed;
};
#endif