|
|
|
@ -8,6 +8,7 @@ |
|
|
|
|
#define REFLOWER_SCENE_MENU_H |
|
|
|
|
|
|
|
|
|
#include <stdint.h> |
|
|
|
|
#include <stdbool.h> |
|
|
|
|
#include <stddef.h> |
|
|
|
|
|
|
|
|
|
#define MENUITEM_LABEL_LEN 30 |
|
|
|
@ -38,10 +39,10 @@ struct MenuScene { |
|
|
|
|
struct Scene base; |
|
|
|
|
// items array
|
|
|
|
|
struct MenuItem *items; |
|
|
|
|
// allow wrap-around
|
|
|
|
|
bool wraparound; |
|
|
|
|
// items count
|
|
|
|
|
size_t items_len; |
|
|
|
|
// number of visible characters in a line at a time
|
|
|
|
|
uint8_t ncols; |
|
|
|
|
// Vertical scroll offset (how many steps is the topmost item moved above the screen)
|
|
|
|
|
int32_t scroll_up; |
|
|
|
|
// Start X
|
|
|
|
@ -56,6 +57,8 @@ struct MenuScene { |
|
|
|
|
int32_t hscroll_cnt; |
|
|
|
|
// Number of lines visible at a time
|
|
|
|
|
uint8_t nlines; |
|
|
|
|
// number of visible characters in a line at a time
|
|
|
|
|
uint8_t ncols; |
|
|
|
|
// selection handler
|
|
|
|
|
MenuScene_onSelect_t onSelect; |
|
|
|
|
// Extra field for the subclass's private use.
|
|
|
|
|