Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Menu Class Reference

Menu Class Reference

Explosion class. More...

#include <Menu.h>

Public Member Functions

 Menu ()
 Constructor.
 ~Menu ()
 Destructor.
void init ()
 Initialises Menu.
void select_part (bool pressed)
 Sets the current menu part to the displayed when a is pressed.
void draw_part (N5110 &lcd)
 Draws the name of the part that is in the middle.
void menu_scroll (Direction d_)
 Scrolls through the different menu parts.
MenuParts get_current_menu_part ()
 Gets the current menu part that is selected.

Detailed Description

Explosion class.

Selects and draws different menu parts

Author:
Benjamin Evans, University of Leeds
Date:
May 2020

Definition at line 27 of file Menu.h.


Constructor & Destructor Documentation

Menu (  )

Constructor.

Definition at line 18 of file Menu.cpp.

~Menu (  )

Destructor.

Definition at line 22 of file Menu.cpp.


Member Function Documentation

void draw_part ( N5110 lcd )

Draws the name of the part that is in the middle.

Parameters:
lcdN5110 object

Definition at line 39 of file Menu.cpp.

MenuParts get_current_menu_part (  )

Gets the current menu part that is selected.

Returns:
current_menu_part_

Definition at line 90 of file Menu.cpp.

void init (  )

Initialises Menu.

Definition at line 26 of file Menu.cpp.

void menu_scroll ( Direction  d_ )

Scrolls through the different menu parts.

Parameters:
d_Direction of joystick

Definition at line 68 of file Menu.cpp.

void select_part ( bool  pressed )

Sets the current menu part to the displayed when a is pressed.

Parameters:
pressedBottom A pressed

Definition at line 81 of file Menu.cpp.