Move menu utils to their own file

This commit is contained in:
Reed Nightingale 2020-02-09 16:01:52 -08:00
parent e2249af826
commit 49c5607dd3
3 changed files with 14 additions and 12 deletions

12
menu.h
View File

@ -1,7 +1,6 @@
#pragma once
#include <stdint.h>
#include "button.h"
#include "nano_gui.h"//Point
enum MenuReturn_e : uint8_t {
@ -25,14 +24,3 @@ struct Menu_t {
};
static const uint8_t MENU_KNOB_COUNTS_PER_ITEM = 10;
//Returns true if submenu was run, false otherwise
bool runSubmenu(Menu_t* current_menu,
void(*const redraw_callback)(),
const ButtonPress_e tuner_button,
const ButtonPress_e touch_button,
const Point touch_point,
const int16_t knob);
void movePuck(const Button *const b_old,
const Button *const b_new);

14
menu_utils.h Normal file
View File

@ -0,0 +1,14 @@
#pragma once
#include "button.h"
//Returns true if submenu was run, false otherwise
bool runSubmenu(Menu_t* current_menu,
void(*const redraw_callback)(),
const ButtonPress_e tuner_button,
const ButtonPress_e touch_button,
const Point touch_point,
const int16_t knob);
void movePuck(const Button *const b_old,
const Button *const b_new);