Yang Zhenye 201199680

Dependencies:   mbed

Committer:
yangzhenye
Date:
Thu Apr 30 07:08:09 2020 +0000
Revision:
2:baca89f466bc
Child:
3:30c81344beff
complete menu and improve roony

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yangzhenye 2:baca89f466bc 1 #ifndef MENU_H
yangzhenye 2:baca89f466bc 2 #define MENU_H
yangzhenye 2:baca89f466bc 3
yangzhenye 2:baca89f466bc 4 #include "mbed.h"
yangzhenye 2:baca89f466bc 5 #include "N5110.h"
yangzhenye 2:baca89f466bc 6 #include "Gamepad.h"
yangzhenye 2:baca89f466bc 7 #include "Engine.h"
yangzhenye 2:baca89f466bc 8
yangzhenye 2:baca89f466bc 9 struct State {
yangzhenye 2:baca89f466bc 10 int output;
yangzhenye 2:baca89f466bc 11 int next_state[4]; }
yangzhenye 2:baca89f466bc 12
yangzhenye 2:baca89f466bc 13 class Menu {
yangzhenye 2:baca89f466bc 14 public:
yangzhenye 2:baca89f466bc 15 Menu();
yangzhenye 2:baca89f466bc 16 ~Menu();
yangzhenye 2:baca89f466bc 17 void init();
yangzhenye 2:baca89f466bc 18 void run(N5110 &lcd, Gamepad &gamepad);
yangzhenye 2:baca89f466bc 19
yangzhenye 2:baca89f466bc 20 private:
yangzhenye 2:baca89f466bc 21 void dispaly_page1();
yangzhenye 2:baca89f466bc 22 void display_page2();
yangzhenye 2:baca89f466bc 23 void display_page3();
yangzhenye 2:baca89f466bc 24 void output();
yangzhenye 2:baca89f466bc 25 void input(bool start, bool back, bool x);
yangzhenye 2:baca89f466bc 26 int _output;
yangzhenye 2:baca89f466bc 27 int _state;
yangzhenye 2:baca89f466bc 28 int _input;
yangzhenye 2:baca89f466bc 29 };
yangzhenye 2:baca89f466bc 30 #endif
yangzhenye 2:baca89f466bc 31