Ikenna Adrian Ozoemena 201157039
Dependencies:
mbed
« Back to documentation index
Menu Class Reference
Menu Class.
More...
#include <Menu.h >
Public Member Functions
Menu ()
constructor
~Menu ()
deconstructor
void init (int ycursor)
A mutator method that initializes the cursor used to select options in the menu.
void title (N5110 &lcd, SHIP shipUsed)
Displays the title screen and changes the displayed ship based on ship selected.
void update (Direction d, Vector2D joystick)
A mutator method that updates the x and y cursor values based on joystick movemnt.
int get_ycursor ()
Accessor method to get tthe current ycursor position used to select options from the menu.
int get_xcursor ()
Accessor method to get the current xcursor position used to select a ship in the ship section of the menu.
void disp_ships (N5110 &lcd)
Displays the ship in the menu home screen.
Detailed Description
Menu Class.
Library for displaying menu screen
Author: Ozoemena Adrian Ikenna
Date: 8th May 2019
Definition at line 14 of file Menu.h .
Constructor & Destructor Documentation
constructor
Definition at line 5 of file Menu.cpp .
deconstructor
Definition at line 10 of file Menu.cpp .
Member Function Documentation
void disp_ships
(
N5110 &
lcd )
Displays the ship in the menu home screen.
Parameters:
&lcd address of the N5110 library used for the lcd display
Definition at line 409 of file Menu.cpp .
Accessor method to get the current xcursor position used to select a ship in the ship section of the menu.
Returns: the xcursor value
Definition at line 405 of file Menu.cpp .
Accessor method to get tthe current ycursor position used to select options from the menu.
Returns: the ycursor value
Definition at line 401 of file Menu.cpp .
void init
(
int
ycursor )
A mutator method that initializes the cursor used to select options in the menu.
Parameters:
ycursor the yposition of the rectangle used as a cursor
Definition at line 335 of file Menu.cpp .
void title
(
N5110 &
lcd ,
SHIP
shipUsed
)
Displays the title screen and changes the displayed ship based on ship selected.
Parameters:
&lcd address of the N5110 library used for the lcd display
shipUsed a variable of enum SHIP which contains the ship currently being used
Definition at line 341 of file Menu.cpp .
void update
(
Direction
d ,
Vector2D
joystick
)
A mutator method that updates the x and y cursor values based on joystick movemnt.
Parameters:
d the current direction of the joystick
joystick a 2D vector of the x and y joystick value
Definition at line 367 of file Menu.cpp .