Henry Triff / Mbed 2 deprecated ELEC2645_Project_el18ht

Dependencies:   mbed

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 ()
 Destructor.
bool Main_Menu (N5110 &LCD, Gamepad &Device)
 Runs the main menu screen and the settings, credits and instructions menus.
bool Game_Setup (N5110 &LCD, Gamepad &Device)
 Runs the finite state machine for the game setup.
int Get_Mode ()
 Returns the decided game mode.
int Get_Map ()
 Returns the decided game map.
int Get_Laps ()
 Returns the number of laps decided.
int Get_Car ()
 Returns the decided car.
bool Get_Setting_LED ()
 Returns the LED setting.
bool Get_Setting_Gyro ()
 Returns the gyro control setting.

Detailed Description

Menu Class.

Creates all game graphics.

Author:
Henry W Triff
Date:
Mar, 2020

Definition at line 107 of file Menu.h.


Constructor & Destructor Documentation

Menu (  )

Constructor.

Definition at line 7 of file Menu.cpp.

~Menu (  )

Destructor.

Definition at line 11 of file Menu.cpp.


Member Function Documentation

bool Game_Setup ( N5110 LCD,
Gamepad Device 
)

Runs the finite state machine for the game setup.

Parameters:
LCDThis is the N5110 class object (object)
DeviceThis is the Gamepad class object (object)
Returns:
True if the game should be started and false if returning to the main menu is required (bool)

Definition at line 612 of file Menu.cpp.

int Get_Car (  )

Returns the decided car.

Returns:
The selected car (int)

Definition at line 895 of file Menu.cpp.

int Get_Laps (  )

Returns the number of laps decided.

Returns:
The selected number of laps (int)

Definition at line 891 of file Menu.cpp.

int Get_Map (  )

Returns the decided game map.

Returns:
The selected game map (int)

Definition at line 887 of file Menu.cpp.

int Get_Mode (  )

Returns the decided game mode.

Returns:
The selected game mode (int)

Definition at line 883 of file Menu.cpp.

bool Get_Setting_Gyro (  )

Returns the gyro control setting.

Returns:
The selected gyro control setting (bool)

Definition at line 903 of file Menu.cpp.

bool Get_Setting_LED (  )

Returns the LED setting.

Returns:
The selected LED setting (bool)

Definition at line 899 of file Menu.cpp.

bool Main_Menu ( N5110 LCD,
Gamepad Device 
)

Runs the main menu screen and the settings, credits and instructions menus.

It also passes off to the game setup

Parameters:
LCDThis is the N5110 class object (object)
DeviceThis is the Gamepad class object (object)
Returns:
True if the SD card needs to be formatted (bool)

Definition at line 361 of file Menu.cpp.