-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClasses.h
42 lines (32 loc) · 977 Bytes
/
Classes.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
#ifndef _Classes_H_
#define _Classes_H_
#include <Arduino.h>
class UpDownValue
{ public:
UpDownValue(int value, int step, int minValue, int maxValue);
int up();
int down();
UpDownValue::operator int();
int value, step, minValue, maxValue;
};
// ---------------------------------------------------------------------------
class MenuItem
{ public:
MenuItem(String name, UpDownValue value);
String name;
UpDownValue upDownVal;
};
// ---------------------------------------------------------------------------
class Menu
{ public:
void control();
void displayAll();
void displayName(int itemNr, String &name);
void displayValue(int itemNr, int value, bool focus, bool background);
void displayDot(bool on);
void drawColorTextLine(int line, int left, String str, uint16_t color=COLOR_WHITE, uint16_t backgroundColor=COLOR_BLACK);
private:
bool editValue=0;
const int txtLeft = 17;
};
#endif