feat: add proof-of-concept

This commit is contained in:
2026-04-29 00:11:35 +02:00
parent d9b72aa8b5
commit 0f807a1867
6 changed files with 216 additions and 58 deletions
+5 -10
View File
@@ -3,20 +3,15 @@
#include <Arduino.h>
#include "joystick.hpp"
typedef struct {
String name;
void (*action)();
} Item;
class Menu {
public:
Menu(Item* items);
void updateCurrentItem(JoystickDirection& direction);
void execute();
Menu();
void setItems(String* items);
bool updateCurrentItem(JoystickDirection& direction);
Item& getItemAt(size_t index);
String& getItemAt(size_t index);
size_t getCurrentItemIndex() const;
private:
Item items[MENU_ITEM_COUNT];
String items[MENU_ITEM_COUNT];
int currentItem;
};