aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/tests/if.lingo
blob: cbf70f687332ddc0e044de706f1c266c1cb42004 (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
41
42
43
44
45
46
47
48
--
set x = 1
if x = 5 then exit
else put 10.0

repeat with x = 1 to 6
	if x = 3 then put 30
	else if x = 4 then put 40
	else if x = 5 then put 50
	else put 10.0
	if x = 1 then
	  put 1
	else if x = 2 then
	  put 1232.12345678901234
	  put 2.2
	else if x = 3 then
		put 3
	else if x = 4 then
	  put 4
	else if x = 5 then
	  put 5
  	else if x = 6 then
	  put 6
	end if
	if x = 4 then put 40
	else put 50
end repeat


macro checkKey
    if the keyCode = 36 then                    --  return key goes to first menu
        go to frame 1
    else if the keyCode = 123 then           --  left arrow goes to previous menu
        dontPassEvent
        go to marker(-1)
    else if the keyCode = 124 then           --  right arrow goes to next menu
        dontPassEvent
        go to marker(1)
    else if the keyCode = 125 then           --  down arrow goes to last (bottom) menu
        dontPassEvent
        go to frame "credits"
    else if the keyCode = 126 then           --  up arrow goes to first (top) menu
        dontPassEvent
        go to frame 1
    end if

--  specialized macros to determine which sub-menu to return to
--  (these two files appear in two different menus)