// // Created by MightyPork on 2023/04/09. // // Generic menu screen // #ifndef TOASTER_OVEN_BLUEPILL_SCREEN_MENU_H #define TOASTER_OVEN_BLUEPILL_SCREEN_MENU_H #include "gui_event.h" #include "ufb/framebuffer.h" /** * Choice callback for the generic menu screen. Options are indexed from zero */ typedef void (*menu_callback_t)(int choice); /** * Generic menu screen (must be called from a screen function with the standard signature) * * @param event - currently handled event * @param options - options for the menu (items to show, NULL terminated array of const strings) * @param cb - choice callback */ void screen_menu(GuiEvent event, const char **options, menu_callback_t cb); /** Menu with custom offset (default is 15) */ void screen_menu_offset(GuiEvent event, const char **options, menu_callback_t cb, fbpos_t offset); #endif //TOASTER_OVEN_BLUEPILL_SCREEN_MENU_H