/** * Copyright (c) 2021 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #pragma once #include "../libs.h" #include "grid.h" /** Generic callback for menu events */ typedef void menucallback_t(void *user, uint8_t i); /** Structure for a menu */ typedef struct { grid_t grid; uint8_t selected; uint8_t cursorX; uint8_t cursorY; void *user; menucallback_t *onSelect; } menu_t;