-
Notifications
You must be signed in to change notification settings - Fork 0
/
SelectScreen.h
49 lines (37 loc) · 1.17 KB
/
SelectScreen.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//==============================================
// Application main menu screen
//----------------------------------------------
// Author: Gerard Llort Casanova
// Version: 1.1
// Copyright (c) 2021
//==============================================
#ifndef _SELECTSCREEN_H
#define _SELECTSCREEN_H
#include <Arduino.h>
#include "Screen.h"
#define SELECT_OPTIONS_COUNT 5
#define UI_SELECT_TRACK1 0
#define UI_SELECT_TRACK2 1
#define UI_SELECT_TRACK3 2
#define UI_SELECT_TRACK4 3
#define UI_SELECT_RETURN 4
class SelectScreen : public Screen
{
uint8_t selIdx = -1; // Selected menu ID
public:
//----------------------------------------------
// Constructors
//----------------------------------------------
SelectScreen();
//----------------------------------------------
// Methods
//----------------------------------------------
void InitializeUI() override;
void Shown(ScreenParams *params) override;
ScreenParams* ClickHandler(uint8_t objId) override;
void EncoderMovementHandler(EncoderMenuSwitch::EncoderDirection dir) override;
void EncoderClickHandler() override;
private:
char* GetOptionCaption(uint8_t trackNum);
};
#endif