Add background image to library
Add font file to library
Create page style
Create text style
Create Float variables VARA-C
Define a page named "pageName" with style "pageStyle"
Create minus key which decrements VarA by 1 if greater than 1 then runs mathF
Create plus key which increments VarA by 1 if less than 9 then runs mathF
Create text entity for VARA
Create Text entity for EXP Calc VARC
Create Text entity for LOG Calc VARC
Create Text entity for LOG10 Calc VARC
Create Text entity for POW Calc VARC
Create Text entity for SQR Calc VARC
Create Text entity for CBRT Calc VARC
Create mathF
Displays VARA and VARB
Does Calc VARA EXP = VARC display at text1
Does Calc VARA LOG = VARC display at text2
Does Calc VARA LOG10 = VARC display at text3
Does Calc VARA POW = VARC display at text4
Does Calc VARA SQRT = VARC display at text5
Does Calc VARA CBRT = VARC display at text6
Run mathF func
After loading show the page named "pageName"
|
LIB(background,"SDHC/bground.png");
LIB(asc_16b,"SDHC/asc_16b.fnt");
STYLE(pageStyle, Page) { image = background; }
STYLE(textStyle, Text) { font=asc_16b; col=mediumblue;}
VAR(VarA,3, FLT1);VAR(VarC,0, FLT1);
PAGE(pageName, pageStyle)
{
KEY(varAminus,[IF(VarA>1?[CALC(VarA,VarA,1,"-");]); RUN(mathF);],60,60,TOUCHR,35,100);
KEY(varAplus,[IF(VarA<9?[CALC(VarA,VarA,1,"+");]); RUN(mathF);],60,60,TOUCHR,135,100);
TEXT(Text0,"",textStyle, 85, 100);
TEXT(Text1,"",textStyle, 320, 60);
TEXT(Text2,"",textStyle, 320, 100);
TEXT(Text3,"",textStyle, 320, 140);
TEXT(Text4,"",textStyle, 320, 180);
TEXT(Text5,"",textStyle, 320, 220);
TEXT(Text6,"",textStyle, 320, 260);
}
FUNC(mathF)
{
TEXT(Text0,VarA);
CALC(VarC,VarA,"EXP");TEXT(Text1,VarC);
CALC(VarC,VarA,"LOG");TEXT(Text2,VarC);
CALC(VarC,VarA,"LOG10");TEXT(Text3,VarC);
CALC(VarC,VarA,"POW");TEXT(Text4,VarC);
CALC(VarC,VarA,"SQRT");TEXT(Text5,VarC);
CALC(VarC,VarA,"CBRT");TEXT(Text6,VarC);;
}
RUN(mathF);
SHOW(pageName);
|