Add background image to library
Add font file to library
Create page style using background image
Create text style
Create text style using previous text style parameters
Create draw style for box
Setup IO ports so K00 and K01 are active inputs and are triggered on rising edge
Define a page named "pageName" with style "pageStyle"
Create text entity for K00 label
Create draw entity for K00 box
Create text entity for CNTK00 value
Create text entity for K01 label
Create draw entity for K01 box
Create text entity for CNTK01 value
Create Page loop that runs forever
Loads Text entity "Text1" with CNTK00 value
Loads Text entity "Text2" with CNTK01 value
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=White;}
STYLE(textStyle2, textStyle) {col=Black;}
STYLE(drawstyle, Draw) {type=Box;back=steelblue;col=White;width=2;}
SETUP(keyio) {active=\\000003;inp=\\000003;trig=\\000003;edge=\\000003;}
PAGE(pageName, pageStyle)
{
TEXT(Descr1,"K00",textStyle2,140, 100);
DRAW(box1,100,30,drawstyle,140, 136);
TEXT(Text1,"",textStyle,140, 136);
TEXT(Descr2,"K01",textStyle2,340, 100);
DRAW(box2,100,30,drawstyle,340, 136);
TEXT(Text2,"",textStyle,340, 136);
LOOP(Loop1,FOREVER)
{
TEXT(Text1,CNTK00);
TEXT(Text2,CNTK01);;
}
}
SHOW(pageName);
|