Add background image to library
Add font file to library
Create page style using background image
Create text style for multi line text
Create pointer variable, create variable for which variable to load into pointer
Create text variable for English
Create text variable for French
Create text variable for German
Define a page named "pageName" with style "pageStyle"
Create text entity for pointer text
Create text for German key
Create key that loads lang variable to 2 and runs LangC
Create text for French key
Create key that loads lang variable to 1 and runs LangC
Create text for English key
Create key that loads lang variable to 0 and runs LangC
Create LangC function
Load pointer with Ln then tha lang variable
Refresh text entity with the new text pointer variable
Run LangC
After loading show the page named "pageName"
|
LIB(background,"SDHC/bground.png");
LIB(asc16b,"SDHC/asc_16b.fnt");
STYLE(pageStyle,Page) {image=background;}
STYLE(textStyle,Text) {font=asc16b;col=black;maxrows=5;justify=C;}
VAR(lnptr1>"",PTR); VAR(lang,0,U8);
VAR(ln0,"Pointer Demo\\0d\\0dPress Language\\0dTo display this text\\0din desired language",TXT);
VAR(ln1,"Pointer Démo\\0d\\0dAppuyez sur Langue\\0dPour afficher ce texte\\0ddans la langue désirée",TXT);
VAR(ln2,"Pointer Demo\\0d\\0dPresse Sprache\\0dUm diesen Text anzuzeigen\\0din der gewünschten Sprache",TXT);
PAGE(pageName, pageStyle)
{
TEXT(textln1, lnptr1, textStyle,240,110);
TEXT(But1text,"German",textStyle,100,234);
KEY(german, [LOAD(lang,2);RUN(LangC);],56,40,TOUCH,100,234);
TEXT(But2text,"French",textStyle,240,234);
KEY(french, [LOAD(lang,1);RUN(LangC);],56,40,TOUCH,240,234);
TEXT(But3text,"English",textStyle,380,234);
KEY(english,[LOAD(lang,0);RUN(LangC);],56,40,TOUCH,380,234);
}
FUNC(LangC)
{
LOAD(lnptr1>"ln",lang);
TEXT(textln1,lnptr1);;
}
RUN(LangC);
SHOW(pageName);
|