18 lines
360 B
C++
18 lines
360 B
C++
#pragma once
|
|
#define MENU_ITEM_COUNT 4
|
|
#include <Arduino.h>
|
|
#include "joystick.hpp"
|
|
|
|
class Menu {
|
|
public:
|
|
Menu();
|
|
void setItems(String* items);
|
|
bool updateCurrentItem(JoystickDirection& direction);
|
|
|
|
String& getItemAt(size_t index);
|
|
size_t getCurrentItemIndex() const;
|
|
private:
|
|
String items[MENU_ITEM_COUNT];
|
|
int currentItem;
|
|
};
|