ELEC2645 (2018/19) / Mbed 2 deprecated el17apb

Dependencies:   mbed Gamepad N5110

Embed: (wiki syntax)

« Back to documentation index

Menu Class Reference

Menu Class Reference

Menu Class. More...

#include <Menu.h>

Public Member Functions

 Menu ()
 Constructor.
 ~Menu ()
 Deconstructor.
void init ()
 intialises
void title_intro (N5110 &lcd, Gamepad &pad)
 runs the title sequence
int press_start (N5110 &lcd, Gamepad &pad)
 holds title screen and flashes 'press start'
int select_input_main (Gamepad &pad, N5110 &lcd)
 displays main menu screen and takes in input to select next state
int select_input_continue (Gamepad &pad, N5110 &lcd)
 displays continue menu screen and takes in input to select next state
void print_highscore (N5110 &lcd, int highscore)
 displays highscore screen
float print_settings (Gamepad &pad, N5110 &lcd)
 displays continue menu screen and takes in input to select next state

Detailed Description

Menu Class.

class for containing menu screens

Author:
Adam P. Baker
Date:
9 May 2019

Definition at line 13 of file Menu.h.


Constructor & Destructor Documentation

Menu (  )

Constructor.

Definition at line 4 of file Menu.cpp.

~Menu (  )

Deconstructor.

Definition at line 9 of file Menu.cpp.


Member Function Documentation

void init (  )

intialises

Definition at line 16 of file Menu.cpp.

int press_start ( N5110 &  lcd,
Gamepad &  pad 
)

holds title screen and flashes 'press start'

Parameters:
N5110class which controlls lcd screen
Gamepadclass for working with the gamepad
Returns:
_start (1 when pressed, else 0) (int)

Definition at line 149 of file Menu.cpp.

void print_highscore ( N5110 &  lcd,
int  highscore 
)

displays highscore screen

Parameters:
N5110class which controlls lcd screen
highestlevel reached by user (int)

Definition at line 324 of file Menu.cpp.

float print_settings ( Gamepad &  pad,
N5110 &  lcd 
)

displays continue menu screen and takes in input to select next state

Parameters:
Gamepadclass for working with the gamepad
N5110class which controlls lcd screen
Returns:
contrast level (float)

Definition at line 344 of file Menu.cpp.

int select_input_continue ( Gamepad &  pad,
N5110 &  lcd 
)

displays continue menu screen and takes in input to select next state

Parameters:
Gamepadclass for working with the gamepad
N5110class which controlls lcd screen
Returns:
_input (1 when pressed, else 0) (int)

Definition at line 264 of file Menu.cpp.

int select_input_main ( Gamepad &  pad,
N5110 &  lcd 
)

displays main menu screen and takes in input to select next state

Parameters:
Gamepadclass for working with the gamepad
N5110class which controlls lcd screen
Returns:
_input (1 when pressed, else 0) (int)

Definition at line 179 of file Menu.cpp.

void title_intro ( N5110 &  lcd,
Gamepad &  pad 
)

runs the title sequence

Parameters:
N5110class which controlls lcd screen
Gamepadclass for working with the gamepad

Definition at line 26 of file Menu.cpp.