-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.nxc
46 lines (38 loc) · 1.25 KB
/
test.nxc
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
#define STRING_LESS "Less"
#define STRING_OK "OK"
#define STRING_MORE "More"
#include "src/nxc-gui.nxc"
task main()
{
// Loading sample
CornerDrawText("Working...", CORNER_CENTER, CORNER_CENTER);
Loading(25);
Wait(500);
Loading(50);
Wait(500);
Loading(75);
Wait(500);
ClearScreen();
Loading(100);
CornerDrawText("DONE!", CORNER_CENTER, CORNER_CENTER);
Wait(1000);
// NumberPicker sample
NumberPicker(5, "Favorite number:", 0, 10);
ClearScreen();
// CornerDrawText sample
CornerDrawText("BL", CORNER_LEFT, CORNER_BOTTOM);
CornerDrawText("BC", CORNER_CENTER, CORNER_BOTTOM);
CornerDrawText("BR", CORNER_RIGHT, CORNER_BOTTOM);
CornerDrawText("CL", CORNER_LEFT, CORNER_CENTER);
CornerDrawText("Center", CORNER_CENTER, CORNER_CENTER);
CornerDrawText("CR", CORNER_RIGHT, CORNER_CENTER);
CornerDrawText("TL", CORNER_LEFT, CORNER_TOP);
CornerDrawText("TC", CORNER_CENTER, CORNER_TOP);
CornerDrawText("TR", CORNER_RIGHT, CORNER_TOP);
Wait(3000);
ClearScreen();
// WaitForButtonPress sample
char btn = WaitForButtonPress("Left", "Cent.", "Right");
CornerDrawText(NumToStr(btn) + " pressed", CORNER_CENTER, CORNER_CENTER);
Wait(3000);
}