2020-02-22 22:42:31 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../config.h"
|
|
|
|
#include "part_menu.h"
|
2020-02-23 10:15:27 +00:00
|
|
|
#include <U8g2lib.h>
|
2020-02-22 22:42:31 +00:00
|
|
|
|
|
|
|
class MainMenu {
|
|
|
|
public:
|
|
|
|
void back();
|
|
|
|
void enter();
|
|
|
|
void up();
|
|
|
|
void down();
|
|
|
|
|
2020-02-23 10:15:27 +00:00
|
|
|
void render(U8G2* u8g2, int x, int y, int width, int height);
|
2020-02-22 22:42:31 +00:00
|
|
|
|
2020-02-23 13:25:36 +00:00
|
|
|
MainMenu(Part** parts)
|
|
|
|
: partMenus({ parts[0], parts[1], parts[2], parts[3] })
|
|
|
|
, activePartMenu(0)
|
2020-02-22 22:42:31 +00:00
|
|
|
, selectedPart(0) {};
|
|
|
|
|
|
|
|
private:
|
|
|
|
PartMenu partMenus[PART_COUNT];
|
|
|
|
int activePartMenu;
|
|
|
|
|
|
|
|
int selectedPart;
|
|
|
|
};
|