-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommMenu.spin
94 lines (81 loc) · 1.9 KB
/
CommMenu.spin
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
CON
_clkmode=xtal1+pll16x
_xinfreq=5_000_000
obj
SC : "Screen"
TC : "trackBallEx"
CM : "Comms"
pub main |currentItem
CM.Init
SC.Init
SC.Clear
SC.TxtColor($FF,$E0)
SC.Position(4,4)
SC.Print(string("Ex Cord"))
SC.Position(4,14)
SC.Print(string("Ex Map"))
SC.Position(8,4)
SC.Print(string("Im Cal"))
SC.Position(8,14)
SC.Print(string("Del Cal"))
SC.DrawRec(80,45,25,25,$F8,$00)
currentItem:=0
TC.Run
repeat until TC.isPressed==true
TC.Run
if TC.isRight==true
SC.Click
case currentItem
0:
SC.DrawRec(95,45,145,25,$F8,$00)'map
SC.DrawRec(80,45,25,25,$00,$00)
currentItem:=1
2:
SC.DrawRec(75,75,25,55,$00,$00)
SC.DrawRec(150,75,95,55,$F8,$00)'del
currentItem:=3
if TC.isLeft==true
SC.Click
case currentItem
1:
SC.DrawRec(95,45,145,25,$00,$00)'map
SC.DrawRec(80,45,25,25,$F8,$00)
currentItem:=0
3:
SC.DrawRec(75,75,25,55,$F8,$00)
SC.DrawRec(150,75,95,55,$00,$00)'del
currentItem:=2
if TC.isDown==true
SC.Click
case currentItem
0:
SC.DrawRec(80,45,25,25,$00,$00)
SC.DrawRec(75,75,25,55,$F8,$00)'cal
currentItem:=2
1:
SC.DrawRec(95,45,145,25,$00,$00)
SC.DrawRec(150,75,95,55,$F8,$00)'del
currentItem:=3
if TC.isUp==true
SC.Click
case currentItem
2:
SC.DrawRec(75,75,25,55,$00,$00)'cal
SC.DrawRec(80,45,25,25,$F8,$00)
currentItem:=0
3:
SC.DrawRec(95,45,145,25,$F8,$00)'map
SC.DrawRec(150,75,95,55,$00,$00)'del
currentItem:=1
repeat until TC.isPressed==false
TC.Run
'out of menu, launch action
case currentItem
0:
CM.ExportGPSSingle
1:
CM.ExportGPSTrack
2:
CM.ImportCal
3:
CM.DelCal