projects
/
oftp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
foo
[oftp]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
5fb66a6
..
329f053
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-1,8
+1,12
@@
-#include <conio.h>
#include "tgfx.h"
#include "tgfx.h"
+#include "input.h"
int main(void)
{
int main(void)
{
+ union event ev;
+
+ init_input();
+
tg_bgchar(' ');
tg_clear();
tg_bgchar(' ');
tg_clear();
@@
-10,15
+14,28
@@
int main(void)
tg_rect("Remote", 0, 0, 40, 23, TGFX_FRAME);
tg_rect("Local", 40, 0, 40, 23, TGFX_FRAME);
tg_rect("Remote", 0, 0, 40, 23, TGFX_FRAME);
tg_rect("Local", 40, 0, 40, 23, TGFX_FRAME);
+ tg_bgcolor(0);
tg_fgcolor(7);
tg_fgcolor(7);
- tg_text(0, 24, "fooolalala bar");
-/* tg_setcursor(2, 24);*/
+ tg_text(0, 23, ">");
+ tg_setcursor(2, 23);
- while(getch() != 27);
+ while(wait_input(&ev)) {
+ switch(ev.type) {
+ case EV_KEY:
+ if(ev.key.key == 27) goto done;
+ break;
+ default:
+ break;
+ }
+ }
+
+done:
tg_bgchar(' ');
tg_bgcolor(0);
tg_fgcolor(7);
tg_clear();
tg_bgchar(' ');
tg_bgcolor(0);
tg_fgcolor(7);
tg_clear();
+
+ cleanup_input();
return 0;
}
return 0;
}