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