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.
MicroMDAEPiano/UI.hpp

84 lines
2.5 KiB

/*
MicroMDAEPiano
MicroMDAEPiano is a port of the MDA-EPiano sound engine
(https://sourceforge.net/projects/mda-vst/) for the Teensy-3.5/3.6 with audio shield.
(c)2019 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <LiquidCrystal_I2C.h>
#include <LiquidMenu.h>
#ifndef UI_HPP_INCLUDED
#define UI_HPP_INCLUDED
extern LiquidCrystal_I2C lcd;
// Welcome screen
const char text00[] PROGMEM = "MicroMDAEPiano";
const char text01[] PROGMEM = "(c)parasiTstudio";
LiquidLine welcome_line1(1, 0, text00);
LiquidLine welcome_line2(0, 1, text01);
LiquidScreen welcome_screen(welcome_line1, welcome_line2);
// Main menu
const char text10[] PROGMEM = "Favorites ";
const char text11[] PROGMEM = "Sound ";
const char text12[] PROGMEM = "Store ";
const char text13[] PROGMEM = "Info ";
LiquidLine main_line1(0, 0, text10);
LiquidLine main_line2(0, 1, text11);
LiquidScreen main_screen(main_line1, main_line2);
LiquidMenu main_menu(lcd,welcome_screen,main_screen,1);
// Sound menu
const char text20[] PROGMEM = "Decay ";
const char text21[] PROGMEM = "Release ";
const char text22[] PROGMEM = "Hardness ";
const char text23[] PROGMEM = "Treble ";
LiquidLine sound_line1(0, 0, text20);
LiquidLine sound_line2(0, 1, text21);
LiquidLine sound_line3(0, 1, text22);
LiquidLine sound_line4(0, 1, text23);
LiquidScreen sound_screen(sound_line1, sound_line2, sound_line3, sound_line4);
LiquidMenu sound_menu(lcd,sound_screen);
// System menu
LiquidSystem menu_system(main_menu, sound_menu);
void callback_main_function() {
Serial.println(F("You called the main callback function."));
}
void menu_init(void)
{
// LCD display setup
lcd.init();
lcd.blink_off();
lcd.cursor_off();
lcd.backlight();
lcd.noAutoscroll();
main_line1.attach_function(1, callback_main_function);
menu_system.update();
}
#endif