forked from DCC-EX/CommandStation-EX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenuinformation.h
45 lines (37 loc) · 1.04 KB
/
menuinformation.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
/*
* La Box Project
* menuInformation Classes
*
* @Author : Cedric Bellec
* @Organization : Locoduino.org
*/
#ifndef MENUINFORMATION
#define MENUINFORMATION
#ifdef USE_HMI
#include "menuobject.h"
#include "hmiConfig.h"
class hmi;
#define HMIInfo_MessageNumber 20 // 20 messages max.
#define HMIInfo_MessageMaxSize 22 // 21 characters for one message. DO NOT FORGET /0 at the end !
#define HMIInfo_LinesOnScreen 5 // 5 lines max on the screen
class menuInformation : public menuObject
{
public:
//----- Members
char messages[HMIInfo_MessageNumber][HMIInfo_MessageMaxSize+1]; // 20 messages of 21 chars max (plus /0)
byte firstMessage;
//----- functions
menuInformation(Adafruit_SSD1306* screen, menuObject* parent, const char* title, int value);
void begin() override;
void start() override;
void update() override;
void eventUp() override;
void eventDown() override;
int eventSelect() override;
protected:
//----- Members
//----- functions
void resetMenu() override;
};
#endif
#endif