comparison nodejs/testdesktop.js @ 758:d11b0900f03c

Check in the dynamic menu example. Currently, it illustarte a bug in the renderer.
author wycc
date Sat, 28 Aug 2010 17:31:59 +0800
parents ffbf9910213c
children 77b561bb7929
comparison
equal deleted inserted replaced
757:f43224bf3524 758:d11b0900f03c
11 audio = app.get("audio"); 11 audio = app.get("audio");
12 picture = app.get("picture"); 12 picture = app.get("picture");
13 setting = app.get("setting"); 13 setting = app.get("setting");
14 items=[video,audio,picture,setting]; 14 items=[video,audio,picture,setting];
15 item = 2; 15 item = 2;
16 an = new animate.scale(app,items[item],1,1.5,0.3); 16 an = new animate.scale(app,items[item],1,2,0.1);
17 an.start(); 17 an.start();
18 18
19 app.addKeyListener(mbapp.KEY_UP, function() { 19 app.addKeyListener(mbapp.KEY_UP, function() {
20 var old = items[item]; 20 var old = items[item];
21 item = item - 1; 21 item = item - 1;
22 if (item == -1) { 22 if (item == -1) {
23 item = 0; 23 item = 0;
24 return; 24 return;
25 } 25 }
26 var target = items[item]; 26 var target = items[item];
27 var an = new animate.scale(app,old,1,1,0.3); 27 var an = new animate.scale(app,old,1,1,0.1);
28 an.start(); 28 an.start();
29 an = new animate.scale(app,target,1,1.5,0.3); 29 an = new animate.scale(app,target,1,2,0.3);
30 an.start(); 30 an.start();
31 }); 31 });
32 32
33 app.addKeyListener(mbapp.KEY_DOWN, function() { 33 app.addKeyListener(mbapp.KEY_DOWN, function() {
34 var old = items[item]; 34 var old = items[item];
36 if (item == items.length) { 36 if (item == items.length) {
37 item = item - 1; 37 item = item - 1;
38 return; 38 return;
39 } 39 }
40 var target = items[item]; 40 var target = items[item];
41 var an = new animate.scale(app,old,1,1,0.3); 41 var an = new animate.scale(app,old,1,1,0.1);
42 an.start(); 42 an.start();
43 an = new animate.scale(app,target,1,1.5,0.3); 43 an = new animate.scale(app,target,1,2,0.3);
44 an.start(); 44 an.start();
45 }); 45 });
46 46
47 app.loop(); 47 app.loop();