Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Menu/Menu.h
- Committer:
- lukeocarwright
- Date:
- 2020-05-19
- Revision:
- 16:14c231624f3e
- Parent:
- 14:9cfe0041cc4e
- Child:
- 17:358987e9f30e
File content as of revision 16:14c231624f3e:
#ifndef MENU_H
#define MENU_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Front.h"
/** Menu class
 * @author Luke Cartwright, University of Leeds
 * @brief manages all menu selection and movement
 * @date May 2020
*/
class Menu
{
public://-----------------------------------------------------------------------
    //variables
    //methods
    //constructor
    Menu();
    //destructior
    ~Menu();
    //runs main menu code
    void mainmenu(N5110 &lcd, Gamepad &pad);
    //sub menus
    void subwaveforms(N5110 &lcd, Gamepad &pad);
    void subinstructions(N5110 &lcd, Gamepad &pad);
    void subcredits(N5110 &lcd, Gamepad &pad);
    void subsettings(N5110 &lcd, Gamepad &pad);
    int scroll(N5110 &lcd, Gamepad &pad, int submenu, int menusize);
    void volumerun(N5110 &lcd, Gamepad &pad);
    void MIDIsettings(N5110 &lcd, Gamepad &pad);
    void contrastrun(N5110 &lcd, Gamepad &pad);
private: //---------------------------------------------------------------------
    //variables
    int menuflag;
    int g_selecty;
    int submenu;
    int menusize;
    enum d;
    int s;
    //Methods
    void printmainmenu(N5110 &lcd); //prints menu
    void printsubwaveforms(N5110 &lcd); //prints subwaveforms menu
    void printsubsettings(N5110 &lcd); //prints settings submenu
    void subunavailiable(N5110 &lcd); //prints error for sub
    int scroll_check(Gamepad &pad);
};
#endif