You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
690 B

  1. // Copyright 2022 Andrew Dunai (@and3rson)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "quantum.h"
  4. #include "stdint.h"
  5. #include "endgame48.h"
  6. #include "symbols.h"
  7. #include "oled/oled_driver.h"
  8. #include "stdio.h"
  9. typedef struct menu_item_t {
  10. char title[6];
  11. void (*func)(void);
  12. struct menu_t *submenu;
  13. } menu_item_t;
  14. typedef struct menu_t {
  15. char *title;
  16. uint8_t count;
  17. uint8_t current;
  18. uint8_t scroll;
  19. void (*opened)(struct menu_t *);
  20. menu_item_t *items;
  21. } menu_t;
  22. extern menu_t main_menu;
  23. bool menu_process_record(uint16_t keycode, keyrecord_t *record);
  24. bool menu_encoder_update(uint8_t index, bool clockwise);
  25. bool menu_oled_task(void);