ubitxv6/menu.h

27 lines
562 B
C
Raw Normal View History

2020-02-09 17:10:08 -05:00
#pragma once
#include <stdint.h>
#include "nano_gui.h"//Point
enum MenuReturn_e : uint8_t {
StillActive,
ExitedRedraw,
ExitedNoRedraw
};
enum ButtonPress_e : uint8_t {
NotPressed,
ShortPress,
LongPress
};
2020-02-09 17:10:08 -05:00
struct Menu_t {
MenuReturn_e (*const runMenu)(const ButtonPress_e tuner_button,
const ButtonPress_e touch_button,
const Point touch_point,
const int16_t knob);
2020-02-09 17:10:08 -05:00
Menu_t* active_submenu;
};
static const uint8_t MENU_KNOB_COUNTS_PER_ITEM = 10;