Add background image to library
Add Image to library removing red pixels
Add font file to library
Create page style using background image
Create text style
Create draw style
Create image style
Create variables for text, draw and image status
Define a page named "pageName" with style "pageStyle"
Create text entity
Create draw entity
Create Image entity
Create key that runs TEXTSH
Create key that runs BOXSH
Create key that runs IMGSH
Create TEXTSH function check status of TStat then change Status and Show/Hide Text entity depending on status
Create BOXSH function check status of BStat then change Status and Show/Hide Draw entity depending on status
Create IMGSH function check status of IStat then change Status and Show/Hide Image entity depending on status
After loading show the page named "pageName"
|
LIB(background,"SDHC/bground.png");
LIB(Image,"SDHC/MoveImg.bmp?back=\\ff0000");
LIB(asc_16,"SDHC/asc_16b.fnt");
STYLE(pageStyle,Page) {image=background;}
STYLE(textStyle,Text) {font=asc_16;col=black;}
STYLE(drawStyle,Draw) {type=B;col=red;back=darkorange;width=3;}
STYLE(imgStyle,Image) {curRel=CC;}
VAR(TStat,0,U8);VAR(BStat,0,U8);VAR(IStat,0,U8);
PAGE(pageName, pageStyle)
{
TEXT(Text1,"Text Entity",textStyle,120,136);
DRAW(Box1,50,50,drawStyle,240,136);
IMG(Image1,Image,imgStyle,360,136);
KEY(TK,TEXTSH,100,40,TOUCHR,120,220);
KEY(BK,BOXSH,100,40,TOUCHR,240,220);
KEY(IK,IMGSH,100,40,TOUCHR,360,220);
}
FUNC(TEXTSH){IF(TStat=0?[LOAD(TStat,1); HIDE(Text1);;]:[LOAD(TStat,0);SHOW(Text1);;]);}
FUNC(BOXSH){IF(BStat=0?[LOAD(BStat,1); HIDE(Box1);;]:[LOAD(BStat,0);SHOW(Box1);;]);}
FUNC(IMGSH){IF(IStat=0?[LOAD(IStat,1); HIDE(Image1);;]:[LOAD(IStat,0);SHOW(Image1);;]);}
SHOW(pageName);
|