blob: 11ee13c7bed9576cc1d27891d09fbd8c31e6f4da (
plain)
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
|
#include "gfx.h"
#include "jg10.h"
int main(void)
{
GEventMouse ev;
#if !JG10_SHOW_SPLASH
font_t font;
#endif
gfxInit();
ginputGetMouse(0);
jg10Init();
#if JG10_SHOW_SPLASH
jg10ShowSplash();
#else
font = gdispOpenFont("DejaVuSans16_aa");
gdispDrawString((gdispGetWidth()/2)-(gdispGetStringWidth("Touch to start!", font)/2), gdispGetHeight()/2, "Touch to start!", font, White);
gdispCloseFont(font);
#endif
while (TRUE) {
ginputGetMouseStatus(0, &ev);
if (ev.buttons & GINPUT_MOUSE_BTN_LEFT) {
while (ev.buttons & GINPUT_MOUSE_BTN_LEFT) { // Wait until release
ginputGetMouseStatus(0, &ev);
}
#if !JG10_SHOW_SPLASH
font = gdispOpenFont("DejaVuSans16");
gdispFillArea((gdispGetWidth()/2)-(gdispGetStringWidth("Touch to start!", font)/2), gdispGetHeight()/2, gdispGetWidth()/2, 17, Black);
gdispCloseFont(font);
#endif
jg10Start();
}
}
}
|