-
Notifications
You must be signed in to change notification settings - Fork 0
/
myInput.h
57 lines (39 loc) · 1010 Bytes
/
myInput.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
50
51
52
53
54
55
56
57
//
// Created by Richard on 28.04.2020.
//
#ifndef MICROBIT_SAMPLES_MYINPUT_H
#define MICROBIT_SAMPLES_MYINPUT_H
#include "TwoDigitDisplay.h"
#include "MicroBit.h"
#include "TwoDigitDisplay.h"
#include "myUtils.h"
#define INCREMENT_A 10
#define INCREMENT_B 1
#define INPUTLAG 70
#define LONGTEXTDELAY 65
#define WAITFORINPUTTIME 400
#define FASTSCROLLTIME 40
#define DISPLAYTIME 50
#define PAUSEMULTIPLIKATOR 2562
extern int16_t inputBuff;
extern bool inputterm;
extern uint8_t goback;
extern bool terminator;
extern int pause_setting;
class myInput{
public:
// static myInput& getInstance();
int input();
int input(int previous_val);
int input(const char *message);
int input(char message);
int input(int time, int previous_val);
void inputButton(MicroBitEvent e);
~myInput();
myInput();
private:
void input_done(MicroBitEvent);
void terminate_loop(MicroBitEvent e);
void go_back(MicroBitEvent e);
};
#endif //MICROBIT_SAMPLES_MYINPUT_H