// Menu file for iSMART TFT module ////////// //Files// ///////// LIB(tropical, "SDHC/tropical.bmp"); //load the tropical background image LIB(asc24, "SDHC/asc_24.fnt"); //load the ascii 24 font LIB(atr32, "SDHC/32.bmp?back=\\b3bcdb"); //load coin animation image 32 LIB(atr31, "SDHC/31.bmp?back=\\b3bcdb"); //load coin animation image 31 LIB(atr30, "SDHC/30.bmp?back=\\b3bcdb"); //load coin animation image 30 LIB(atr29, "SDHC/29.bmp?back=\\b3bcdb"); //load coin animation image 29 LIB(atr28, "SDHC/28.bmp?back=\\b3bcdb"); //load coin animation image 28 LIB(atr27, "SDHC/27.bmp?back=\\b3bcdb"); //load coin animation image 27 LIB(atr26, "SDHC/26.bmp?back=\\b3bcdb"); //load coin animation image 26 LIB(atr25, "SDHC/25.bmp?back=\\b3bcdb"); //load coin animation image 25 LIB(atr24, "SDHC/24.bmp?back=\\b3bcdb"); //load coin animation image 24 LIB(atr23, "SDHC/23.bmp?back=\\b3bcdb"); //load coin animation image 23 LIB(atr22, "SDHC/22.bmp?back=\\b3bcdb"); //load coin animation image 22 LIB(atr21, "SDHC/21.bmp?back=\\b3bcdb"); //load coin animation image 21 LIB(atr20, "SDHC/20.bmp?back=\\b3bcdb"); //load coin animation image 20 LIB(atr19, "SDHC/19.bmp?back=\\b3bcdb"); //load coin animation image 19 LIB(atr18, "SDHC/18.bmp?back=\\b3bcdb"); //load coin animation image 18 LIB(atr17, "SDHC/17.bmp?back=\\b3bcdb"); //load coin animation image 17 LIB(atr16, "SDHC/16.bmp?back=\\b3bcdb"); //load coin animation image 16 LIB(atr15, "SDHC/15.bmp?back=\\b3bcdb"); //load coin animation image 15 LIB(atr14, "SDHC/14.bmp?back=\\b3bcdb"); //load coin animation image 14 LIB(atr13, "SDHC/13.bmp?back=\\b3bcdb"); //load coin animation image 13 LIB(atr12, "SDHC/12.bmp?back=\\b3bcdb"); //load coin animation image 12 LIB(atr11, "SDHC/11.bmp?back=\\b3bcdb"); //load coin animation image 11 LIB(atr10, "SDHC/10.bmp?back=\\b3bcdb"); //load coin animation image 10 LIB(atr9, "SDHC/9.bmp?back=\\b3bcdb"); //load coin animation image 9 LIB(atr8, "SDHC/8.bmp?back=\\b3bcdb"); //load coin animation image 8 LIB(atr7, "SDHC/7.bmp?back=\\b3bcdb"); //load coin animation image 7 LIB(atr6, "SDHC/6.bmp?back=\\b3bcdb"); //load coin animation image 6 LIB(atr5, "SDHC/5.bmp?back=\\b3bcdb"); //load coin animation image 5 LIB(atr4, "SDHC/4.bmp?back=\\b3bcdb"); //load coin animation image 4 LIB(atr3, "SDHC/3.bmp?back=\\b3bcdb"); //load coin animation image 3 LIB(atr2, "SDHC/2.bmp?back=\\b3bcdb"); //load coin animation image 2 LIB(atr1, "SDHC/1.bmp?back=\\b3bcdb"); //load coin animation image 1 /////////// //Styles// /////////// STYLE(DropPg, Page){image=tropical;} //create a style for the main page STYLE(Txt24White, Text){ font=asc24; col=white; maxLen=32; maxRows=1; curRel=CC;} //create a style for the text with the font asc24 from the library STYLE(MyImage, Image){ curRel = CC; rotate= 0;} //create a style for the images /////////////// //Variables// ////////////// VAR(cnt,128,U8); //create a variable for the counter of the animation VAR(num,32,U8); //create a variable to place the appropriate image on the pointer VAR(atrptr>"",PTR); //create pointer variable with a default null variable /////////// //Pages// ////////// PAGE(MainPg, DropPg) //set the contents of the main page { POSN(239, 135); //set the position of the touch event and text KEY(AnimKey,[SHOW(Atrea_Pg);],478,270,TOUCH); //create a touch event to start the animation TEXT(Text1, "Touch to View Animation", Txt24White); //create the text } PAGE( Atrea_Pg, DropPg ) //set the contents of the animation page { POSN(366,120); //set the position of the animation image IMG(atrimage,atr32,187,189,MyImage); //create the animation image using the animation pointer source LOOP(animation,FOREVER) //loop to start the animation { LOAD(atrptr>"atr",num); //load the correct image to the pointer IMG(atrimage,atrptr);; //redraw the image to show the next frame IF(num>1?[CALC(num,num,1,"-");]:[LOAD(num,32);]); //load the next frame image for the animation IF(cnt>1?[CALC(cnt,cnt,1,"-");]:[LOAD(cnt,128);SHOW(prev_page);]); //sets the animation to loop for 4 times if cnt <1 resets and shows previous page WAIT(45); //control the speed of animation } } SHOW(MainPg); //show MainPg