| 
                     
                    
Create a library with the background image 
Add font file to Library 
 
Create a style for page with the image as background 
Create a style for text 
Create a style for draws 
 
Create an X posn variable 
Create a num variable 
Create a Text Entity Name Variable 
Create a Text Entity Value Variable 
Create a Draw Entity Name Variable 
Create a Key Entity Name Variable 
Create a Key Entity Value Variable 
 
Create CreateFunc function 
 
Create a loop to run 4 times. 
Load VTxtN with Text and loop number 
Load VTxtV with Text and loop number 
Load VDrawN with Draw and loop number 
Load VKeyN with  Key and loop number 
Load VKeyV with KeyF and loop number 
Cursor at X, 136 
Create Box called VDrawN 
Create Text called VTxtN with text VTxtV 
Create Key called VKeyN with function VKeyV 
Increase X position by 115 
Increase Loop number by 1 
 
Define a page named "pageName" with style "pageStyle" 
 
Run CreateFunc function 
 
 
Create KeyF1 function that changes textstyle colour red 
Create KeyF2 function that changes textstyle colour blue 
Create KeyF3 function that changes textstyle colour yellow 
Create KeyF4 function that changes textstyle colour lime 
 
After loading show the page named "pageName" 
                     
                 | 
                
                     
LIB(background,"SDHC/bground.png"); 
LIB(asc_16,"SDHC/asc_16b.fnt");
 
 STYLE(pageStyle, Page) { image = background; }
 STYLE(textStyle,Text) {font=asc_16; col=\\000d55;}
 STYLE(drawStyle,Draw) {type=box; col=\\000d55; back=\\80ffffff; width=2;}
 
 VAR(X,62,U16);
 VAR(Num,1,U8);
 VAR(VTxtN,"",TXT);
 VAR(VTxtV,"",TXT);
 VAR(VDrawN,"",TXT);
 VAR(VKeyN,"",TXT);
 VAR(VKeyV,"",TXT);
 
 FUNC(CreateFunc)
 {
 LOOP(createl,4)
 {
 LOAD(VTxtN,"Text",Num);
		LOAD(VTxtV,"Text",Num);
 LOAD(VDrawN,"Draw",Num);
 LOAD(VKeyN,"Key",Num);
		LOAD(VKeyV,"KeyF",Num);
 POSN(X,136);
 DRAW(VDrawN,95,95,drawStyle);
 TEXT(VTxtN,VTxtV,textStyle);
 KEY(VKeyN,VKeyV,95,95,TOUCH);
 CALC(X,X,115,"+");
 CALC(Num,Num,1,"+");
 }
 }
 
 PAGE(pageName, pageStyle)
 {
  RUN(CreateFunc);
 }
 
 FUNC(KeyF1){LOAD(textStyle.col,red);;}
 FUNC(KeyF2){LOAD(textStyle.col,blue);;}
 FUNC(KeyF3){LOAD(textStyle.col,yellow);;}
 FUNC(KeyF4){LOAD(textStyle.col,lime);;}
 SHOW(pageName);
 
 |