ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

UX Class Reference

UX Class Reference

UX Class. More...

#include <UX.h>

Public Member Functions

 UX ()
 Constructor.
 ~UX ()
 Deconstructor.
void init ()
 Initlialises the UX class.
int get_a_pressed ()
 checks if the Button A is pressed
int get_l_pressed ()
 checks if the Button L is pressed
void first_menu (N5110 &menu_lcd)
 prints the introuction screen for the game
void second_menu (N5110 &menu_lcd)
 prints options menu and takes user input for which option they would like to choose
void menu_options (N5110 &menu_lcd)
 prints options menu and takes user input for which option they would like to choose
void rules_menu (N5110 &menu_lcd)
 prints the rules for the game across multiple displays
void controls_menu (N5110 &menu_lcd)
 prints the controls for the game across 3 displays
void game_over_menu (N5110 &menu_lcd, int option)
 prints the screen for when game is over
void victory_menu (N5110 &menu_lcd)
 prints the screen when player wins the game
void rules_menu_game (N5110 &menu_lcd)
 Prints the rules for the game on the screen, called in rules_menu()
void rules_menu_screen_out (N5110 &menu_lcd)
 Prints the rules for scoring runs during the game.
void rules_menu_screen_scoring_runs (N5110 &menu_lcd)
 Prints the rules for how a player can get out and lose the game.
void reset ()
 resets the button_pressed boolean variable to false

Detailed Description

UX Class.

Author:
Shahid Zubin Sajid Class for menus and displays for user convenience
Date:
May 2019

Definition at line 14 of file UX.h.


Constructor & Destructor Documentation

UX (  )

Constructor.

Definition at line 2 of file UX.cpp.

~UX (  )

Deconstructor.

Definition at line 6 of file UX.cpp.


Member Function Documentation

void controls_menu ( N5110 menu_lcd )

prints the controls for the game across 3 displays

Parameters:
&menu_lcdreference object for a N5110 class object

Definition at line 199 of file UX.cpp.

void first_menu ( N5110 menu_lcd )

prints the introuction screen for the game

Parameters:
&menu_lcdreference object for a N5110 class object

Definition at line 37 of file UX.cpp.

void game_over_menu ( N5110 menu_lcd,
int  option 
)

prints the screen for when game is over

Parameters:
&menu_lcdreference object for a N5110 class object
optionoption integer which denotes the manner in which the batsman was out

Definition at line 226 of file UX.cpp.

int get_a_pressed (  )

checks if the Button A is pressed

Returns:
returns an int, 1 if the button is pressed 0 if false

Definition at line 21 of file UX.cpp.

int get_l_pressed (  )

checks if the Button L is pressed

Returns:
returns an int, 1 if the button is pressed 0 if false

Definition at line 29 of file UX.cpp.

void init (  )

Initlialises the UX class.

Definition at line 11 of file UX.cpp.

void menu_options ( N5110 menu_lcd )

prints options menu and takes user input for which option they would like to choose

Parameters:
&menu_lcdreference object for a N5110 class object

Definition at line 79 of file UX.cpp.

void reset (  )

resets the button_pressed boolean variable to false

Definition at line 17 of file UX.cpp.

void rules_menu ( N5110 menu_lcd )

prints the rules for the game across multiple displays

Parameters:
&menu_lcdreference object for a N5110 class object

Definition at line 98 of file UX.cpp.

void rules_menu_game ( N5110 menu_lcd )

Prints the rules for the game on the screen, called in rules_menu()

Parameters:
&menu_lcdreference object for a N5110 class object

Definition at line 123 of file UX.cpp.

void rules_menu_screen_out ( N5110 menu_lcd )

Prints the rules for scoring runs during the game.

Parameters:
&menu_lcdreference object for a N5110 class object

Definition at line 179 of file UX.cpp.

void rules_menu_screen_scoring_runs ( N5110 menu_lcd )

Prints the rules for how a player can get out and lose the game.

Parameters:
&menu_lcdreference object for a N5110 class object

Definition at line 142 of file UX.cpp.

void second_menu ( N5110 menu_lcd )

prints options menu and takes user input for which option they would like to choose

Parameters:
&menu_lcdreference object for a N5110 class object

Definition at line 63 of file UX.cpp.

void victory_menu ( N5110 menu_lcd )

prints the screen when player wins the game

Parameters:
&menu_lcdreference object for a N5110 class object

Definition at line 250 of file UX.cpp.