-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyMenuScreen.fnc
45 lines (37 loc) · 1.84 KB
/
myMenuScreen.fnc
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
/*
- Weather station project -
ER4 - IUT Annecy-Le-vieux - 2017
• Anne LENSING
• Helena STICKELBROECK
• Cyrille DUPONT
• Corentin THOMASSET
*/
func menuScreen()
var loop := 1;
var xtouched, ytouched;
img_Show(hndl, glbBackgroundType); // We display the background
img_Show(hndl, IMAGE_MENU_PANEL); // We display the button "SETTINGS" & "HISTORIC"
img_Show(hndl, IMAGE_BACK); // We dsiplay the back button (top left corner)
while(1 == loop)
// We check if an interaction occured
if(getTouchStatus() == TOUCH_PRESSED)
// We get the X and Y coordinates of the touched point
xtouched := touch_Get(TOUCH_GETX);
ytouched := touch_Get(TOUCH_GETY);
if(isDotInBox(xtouched, ytouched,0,0,80,42)) // Back button
glbStateDispaly := STATE_MAIN_SCREEN; // We change the state of the display : we go back to the main screen ...
loop := 0; // ... and we go out of the while loop
else
if(isDotInBox(xtouched, ytouched,95,70,130,40)) // Setting button
glbStateDispaly := STATE_SETTING; // We change the state of the display : we go back to the setting screen ...
loop := 0; // ... and we go out of the while loop
else
if(isDotInBox(xtouched, ytouched,95,133,130,40)) // Historic button
glbStateDispaly := STATE_HISTORIC; // We change the state of the display : we go back to the historic screen ...
loop := 0; // ... and we go out of the while loop
endif
endif
endif
endif
wend
endfunc